﻿:root {
    --ueh-primary: #005f69;
    --ueh-secondary: #f26f33;
}

.hidden{
    display:none !important;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.header-title {
    color: var(--ueh-primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.header-subtitle {
    color: var(--ueh-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--ueh-primary);
    display: inline-block;
    padding-bottom: 2px;
}

.main-title {
    color: var(--ueh-primary);
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
}

.card {
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card-header {
    background-color: var(--ueh-primary);
    color: white;
    font-weight: bold;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0 !important;
}

.card-body {
    padding: 2rem;
    background-color: white;
}

.form-label {
    font-weight: 600;
    color: var(--ueh-primary);
    margin-bottom: 0.5rem;
}

.required {
    color: #dc3545;
}

.form-control, .form-select {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--ueh-primary);
        box-shadow: 0 0 0 0.2rem rgba(0, 95, 105, 0.25);
    }

.grade-table {
    margin-top: 1rem;
}

    .grade-table th {
        background-color: var(--ueh-primary);
        color: white;
        text-align: center;
        font-weight: bold;
        border: 1px solid #ddd;
        padding: 0.75rem;
    }

    .grade-table td {
        text-align: center;
        vertical-align: middle;
        border: 1px solid #ddd;
        padding: 0.5rem;
    }

.d-thm {
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
}

.select2-container--default .select2-selection--single {
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 48px;
        padding-left: 12px;
        color: #495057;
    }

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--ueh-primary);
}

/* Styling cho thông báo lỗi */
.is-invalid {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: block !important;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.is-valid {
    border-color: #28a745 !important;
}

/* Animation cho validation */
.form-control.is-invalid {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70% {
        transform: translateX(-5px);
    }

    90% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .header-section {
        padding: 1rem 0;
    }

    .logo {
        width: 60px;
        height: 60px;
    }

    .card-body {
        padding: 1rem;
    }
}

.form-check {
    margin-bottom: 0.75rem;
}

.form-check-input {
    border: 2px solid #ddd;
    border-radius: 4px;
}

    .form-check-input:checked {
        background-color: var(--ueh-primary);
        border-color: var(--ueh-primary);
    }

    .form-check-input:focus {
        border-color: var(--ueh-secondary);
        box-shadow: 0 0 0 0.2rem rgba(242, 111, 51, 0.25);
    }

.form-check-label {
    color: #333;
    font-weight: 500;
    margin-left: 0.5rem;
}

.info-box {
    background-color: #e8f4f8;
    border-left: 4px solid #17a2b8;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

    .info-box .fas {
        color: #17a2b8;
        margin-right: 0.5rem;
    }

.link-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

    .link-box a {
        color: var(--ueh-primary);
        text-decoration: none;
        font-weight: 600;
    }

        .link-box a:hover {
            color: var(--ueh-secondary);
            text-decoration: underline;
        }

.checkbox-group {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.checkbox-group-title {
    font-weight: bold;
    color: var(--ueh-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.award-icon {
    color: var(--ueh-secondary);
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.specialized-school-section {
    border-top: 2px solid #e9ecef;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.highlight-text {
    background: #ffd200;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .checkbox-group {
        padding: 1rem;
    }

    .form-check-label {
        font-size: 0.9rem;
    }
}

/* CSS cần thêm vào file hsg-style.css */
.calculate-btn {
    background: linear-gradient(45deg, var(--ueh-primary), #007b87);
    border: none;
    color: white;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 95, 105, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

    .calculate-btn:hover {
        background: linear-gradient(45deg, #007b87, var(--ueh-secondary));
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 95, 105, 0.4);
        color: white;
    }

    .calculate-btn:active {
        transform: translateY(0);
    }

    .calculate-btn .fas {
        margin-right: 10px;
        animation: pulse 2s infinite;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.result-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--ueh-primary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 8px 25px rgba(0, 95, 105, 0.15);
    transform: translateY(20px);
    transition: all 0.5s ease;
}

    .result-section.show {
        opacity: 1;
        transform: translateY(0);
    }

.result-header {
    background: var(--ueh-primary);
    color: white;
    padding: 1rem 1.5rem;
    margin: -2rem -2rem 1.5rem -2rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.3rem;
}

.score-breakdown {
    display: grid;
    gap: 1rem;
}

.score-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

    .score-item:hover {
        border-color: var(--ueh-secondary);
        box-shadow: 0 2px 8px rgba(242, 111, 51, 0.15);
    }

.score-label {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.score-value {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--ueh-primary);
    min-width: 80px;
    text-align: right;
}

.score-item.total {
    background: linear-gradient(135deg, var(--ueh-primary), #007b87);
    color: white;
    border: none;
    font-size: 1.2rem;
    margin-top: 1rem;
}

    .score-item.total .score-label,
    .score-item.total .score-value {
        color: white;
        font-size: 1.3rem;
    }

.score-icon {
    margin-right: 10px;
    color: var(--ueh-secondary);
    width: 20px;
}

.score-item.bonus {
    border-left: 4px solid var(--ueh-secondary);
}

    .score-item.bonus .score-value {
        color: var(--ueh-secondary);
    }

.calculation-steps {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

    .calculation-steps h6 {
        color: var(--ueh-primary);
        margin-bottom: 0.5rem;
    }

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

    .warning-box .fas {
        color: #ffc107;
        margin-right: 0.5rem;
    }

/* Loading animation */
.loading {
    display: none;
    text-align: center;
    margin: 1rem 0;
}

    .loading.show {
        display: block;
    }

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ueh-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calculate-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .result-section {
        padding: 1rem;
    }

    .result-header {
        margin: -1rem -1rem 1rem -1rem;
        font-size: 1.1rem;
    }

    .score-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .score-value {
        text-align: left;
        min-width: auto;
    }
}

<!-- CSS bổ sung cho styling -->
.form-select optgroup {
    font-weight: bold;
    font-size: 0.95em;
    background-color: #f8f9fa;
    color: var(--ueh-primary);
}

.form-select option {
    padding: 8px 12px;
    font-weight: normal;
}

.form-select optgroup option {
    padding-left: 20px;
    background-color: white;
    color: #333;
}

.form-select:focus optgroup {
    background-color: #e3f2fd;
}

/* Highlight cho chứng chỉ được chọn */
#ccta.selected {
    border-color: var(--ueh-secondary);
    background-color: #fff5f0;
}

.spinner-layout {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(53, 58, 57, 0.5);
    z-index: 2000;
}

    .spinner-layout .spinner-box {
        width: 500px;
        margin: 0 auto;
        position: relative;
        top: 40%;
    }

        .spinner-layout .spinner-box > img {
            width: 130px;
            position: relative;
            left: 50%;
            transform: translateX(-50%);
            height: 130px;
        }

        .spinner-layout .spinner-box > h2 {
            font-size: 25px;
            color: #fff;
            text-align: center;
            margin-top: 15px;
            font-weight: 400;
        }

.sweetalert2-success-title {
    font-size: 24px;
}


.multiplier-group {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.multiplier-option {
    background-color: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .multiplier-option:hover {
        border-color: var(--ueh-secondary);
        box-shadow: 0 2px 4px rgba(242, 111, 51, 0.1);
    }

    .multiplier-option .form-check-input:checked + .form-check-label {
        color: var(--ueh-primary);
        font-weight: bold;
    }

    .multiplier-option .form-check-input:checked ~ * {
        border-color: var(--ueh-primary);
    }

.form-check-input:checked {
    background-color: var(--ueh-primary);
    border-color: var(--ueh-primary);
}

.form-check-label {
    cursor: pointer;
    width: 100%;
}

    .form-check-label small {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }

    .form-check-label i {
        margin-right: 0.5rem;
        color: var(--ueh-secondary);
    }

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
}

    .badge.bg-success {
        background-color: #28a745 !important;
    }

    .badge.bg-warning {
        background-color: #ffc107 !important;
        color: #212529 !important;
    }

.alert-warning {
    border-left: 4px solid #ffc107;
}

.d-thpt {
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
}

    .d-thpt:focus {
        border-color: var(--ueh-primary);
        box-shadow: 0 0 0 0.2rem rgba(0, 95, 105, 0.25);
        background-color: #f8fffe;
    }

    .d-thpt.is-valid {
        border-color: #28a745;
        background-color: #f8fff9;
    }

    .d-thpt.is-invalid {
        border-color: #dc3545;
        background-color: #fff8f8;
        animation: shake 0.5s ease-in-out;
    }

.input-group-text {
    background-color: var(--ueh-primary);
    color: white;
    border: none;
    font-weight: bold;
}

.grade-table th {
    background-color: var(--ueh-primary);
    color: white;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.grade-table td {
    vertical-align: middle;
    border: 1px solid #ddd;
    padding: 0.75rem;
}

.table-warning td {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

#total_thpt_score {
    color: var(--ueh-primary) !important;
    font-size: 1.5rem !important;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70% {
        transform: translateX(-5px);
    }

    90% {
        transform: translateX(5px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .multiplier-option {
        margin-bottom: 1rem;
    }

    .input-group-text {
        font-size: 0.875rem;
    }

    .d-thpt {
        font-size: 0.9rem;
    }

    #total_thpt_score {
        font-size: 1.2rem !important;
    }
}