/* Calculadora de Baremo Militar - Frontend Styles */
:root {
    --cbm-primary: #173f38;
    --cbm-secondary: #35cb76;
    --cbm-light: #f9f9f9;
    --cbm-gray: #939f9a;
    --cbm-white: #ffffff;
    --cbm-border: #c9d7d7;
    --cbm-error: #dc3545;
    --cbm-success: #28a745;
}

.cbm-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Open Sans', sans-serif;
}

.cbm-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--cbm-primary);
    color: var(--cbm-white);
    border-radius: 8px;
}

.cbm-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 700;
}

.cbm-header p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.cbm-type-selector {
    background: var(--cbm-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.cbm-type-selector h2 {
    margin: 0 0 20px 0;
    color: var(--cbm-primary);
    font-size: 1.5rem;
}

.cbm-type-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cbm-type-btn {
    padding: 20px;
    background: var(--cbm-light);
    border: 2px solid var(--cbm-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.cbm-type-btn:hover {
    border-color: var(--cbm-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(53, 203, 118, 0.2);
}

.cbm-type-btn.active {
    background: var(--cbm-primary);
    color: var(--cbm-white);
    border-color: var(--cbm-primary);
}

.cbm-type-btn h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.cbm-type-btn p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.cbm-form-section {
    background: var(--cbm-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.cbm-form-section h2 {
    margin: 0 0 20px 0;
    color: var(--cbm-primary);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--cbm-secondary);
    padding-bottom: 10px;
}

.cbm-form-group {
    margin-bottom: 25px;
}

.cbm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cbm-primary);
    font-size: 0.95rem;
}

.cbm-form-group small {
    display: block;
    margin-top: 5px;
    color: var(--cbm-gray);
    font-size: 0.85rem;
    font-style: italic;
}

.cbm-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--cbm-border);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.cbm-input:focus {
    outline: none;
    border-color: var(--cbm-secondary);
    box-shadow: 0 0 0 3px rgba(53, 203, 118, 0.1);
}

.cbm-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.cbm-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cbm-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cbm-subsection {
    background: var(--cbm-light);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.cbm-subsection h3 {
    margin: 0 0 15px 0;
    color: var(--cbm-primary);
    font-size: 1.1rem;
}

.cbm-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cbm-radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--cbm-white);
    border: 1px solid var(--cbm-border);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cbm-radio-option:hover {
    border-color: var(--cbm-secondary);
}

.cbm-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
}

.cbm-radio-option.selected {
    border-color: var(--cbm-primary);
    background: rgba(23, 63, 56, 0.05);
}

.cbm-results {
    background: linear-gradient(135deg, var(--cbm-primary) 0%, #1f5349 100%);
    padding: 40px;
    border-radius: 8px;
    color: var(--cbm-white);
    margin-bottom: 30px;
}

.cbm-results h2 {
    margin: 0 0 30px 0;
    font-size: 1.8rem;
    text-align: center;
}

.cbm-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cbm-result-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.cbm-result-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.cbm-result-card .cbm-score {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.cbm-result-card .cbm-max {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 5px;
}

.cbm-total-score {
    background: rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.cbm-total-score h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
}

.cbm-total-score .cbm-final-score {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0;
}

.cbm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.cbm-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cbm-btn-primary {
    background: var(--cbm-secondary);
    color: var(--cbm-primary);
}

.cbm-btn-primary:hover {
    background: #2bb865;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(53, 203, 118, 0.3);
}

.cbm-btn-secondary {
    background: var(--cbm-white);
    color: var(--cbm-primary);
}

.cbm-btn-secondary:hover {
    background: var(--cbm-light);
    transform: translateY(-2px);
}

.cbm-btn-outline {
    background: transparent;
    color: var(--cbm-white);
    border: 2px solid var(--cbm-white);
}

.cbm-btn-outline:hover {
    background: var(--cbm-white);
    color: var(--cbm-primary);
}

.cbm-user-info {
    background: var(--cbm-light);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.cbm-user-info h3 {
    margin: 0 0 20px 0;
    color: var(--cbm-primary);
}

.cbm-user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.cbm-alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.cbm-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.cbm-alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--cbm-success);
}

.cbm-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.cbm-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--cbm-error);
}

.cbm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--cbm-white);
    animation: cbm-spin 1s ease-in-out infinite;
}

@keyframes cbm-spin {
    to { transform: rotate(360deg); }
}

.cbm-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cbm-header h1 {
        font-size: 1.5rem;
    }

    .cbm-input-group {
        grid-template-columns: 1fr;
    }

    .cbm-results-grid {
        grid-template-columns: 1fr;
    }

    .cbm-result-card .cbm-score {
        font-size: 2rem;
    }

    .cbm-total-score .cbm-final-score {
        font-size: 2.5rem;
    }

    .cbm-actions {
        flex-direction: column;
    }

    .cbm-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .cbm-actions,
    .cbm-type-selector {
        display: none;
    }

    .cbm-calculator-container {
        max-width: 100%;
    }
}
