/* Inherit base styles from Kingdoms.css */
@import url('Kingdoms.css');

/* Custom styles for ArmyCalc */
.calculator-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.justify-text {
    text-align: justify;
    line-height: 1.6;
}

.kingdoms-table td {
    vertical-align: middle;
}

.kingdoms-table th {
    background-color: #90aecb;
    color: black !important;
    font-weight: 600;
    font-size: var(--kingdom-font-size-xxl);
}

.info-section {
    max-width: 800px;
    margin: 0 auto 30px;
}

.info-section h4 {
    color: #333;
    margin-bottom: 15px;
}

.info-section p {
    color: #666;
}

/* Table specific styles */
.army-table td:nth-child(2) {
    font-weight: 500;
}

.army-table tr:nth-child(5n) td {
    background-color: #f8f9fa;
}

/* Modificar estilos para hacer el contenido más responsive */
.calculator-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    overflow: hidden; /* Previene scroll horizontal */
}

.calculator-section {
    flex: 1;
    min-width: 280px; /* Mínimo ancho para el formulario */
}

.results-section {
    flex: 2;
    min-width: 280px; /* Mínimo ancho para la tabla */
}

.table-container {
    width: 100%;
    margin: 0;
    overflow-x: hidden; /* Evitar scroll horizontal */
}

.kingdoms-table {
    width: 100%;
    min-width: unset; /* Eliminar el ancho mínimo */
    table-layout: fixed;
}

.kingdoms-table th,
.kingdoms-table td {
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .calculator-form {
        margin-bottom: 20px;
    }
    
    .kingdoms-table th,
    .kingdoms-table td {
        padding: 8px 4px;
        font-size: var(--kingdom-font-size-md);
    }

    .calculator-content {
        flex-direction: column;
    }

    .calculator-section,
    .results-section {
        width: 100%;
        min-width: unset;
    }

    .calculator-form {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .calculator-form {
        padding: 15px;
    }
    
    .kingdoms-table th,
    .kingdoms-table td {
        padding: 6px 2px;
        font-size: var(--kingdom-font-size-sm);
    }
}