/* ===========================================================
   SHARED ASSESSMENT STYLES
   Common CSS for Assessment Score, CSE Weightage, Assessment Info, Roadmap, and Assessment Comparison

   CSS Variables for page-specific header heights:
   - --score-header-height (Assessment Score)
   - --header-height (CSE Weightage)
   - --roadmap-header-height (Roadmap)
   Use these in page-specific CSS files for container calc()
   =========================================================== */

/* ===========================================================
   BASE LAYOUT CLASSES - USED BY ALL ASSESSMENT PAGES
   =========================================================== */

/* Generic fixed header base - all pages inherit this */
.page-fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Generic container base - all pages inherit this */
.page-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Generic form controls - rounded style */
.form-control-rounded {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Assessment button base */
.btn-assessment {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: capitalize !important;
}

/* Confirmation dialog button text — override Radzen material theme uppercase */
.confirm-dialog-proper-case .rz-button {
    text-transform: none !important;
}

.confirm-dialog-proper-case .rz-button .rz-button-box {
    text-transform: none !important;
}

/* Wrap long file names and suppress horizontal scrollbar */
.confirm-dialog-proper-case .rz-dialog-content,
.confirm-dialog-proper-case .rz-confirm-dialog {
    overflow-x: hidden !important;
    word-break: break-word !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* ===========================================================
   LOADING STATES
   =========================================================== */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 50px;
}

.loading-text {
    color: #667eea;
    font-weight: 600;
}

.color-theme-b2 {
    color: #667eea !important;
}

.spinner-border.color-theme-b2 {
    border-color: #667eea;
    border-right-color: transparent;
}

/* ===========================================================
   HEADER LEGEND ITEMS
   =========================================================== */
.header-text-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 0px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

    .legend-item::before {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
        display: inline-block;
    }

.legend-domain {
    color: #667eea;
}

    .legend-domain::before {
        background-color: #667eea;
    }

.legend-process {
    color: #10b981;
}

    .legend-process::before {
        background-color: #10b981;
    }

.legend-practice {
    color: #f59e0b;
}

    .legend-practice::before {
        background-color: #f59e0b;
    }

/* ===========================================================
   EXPAND/COLLAPSE BUTTONS
   =========================================================== */
.expand-contract-button {
    min-width: 130px;
    height: 38px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #4a6cf7;
    background: linear-gradient(135deg, #4a6cf7 0%, #6366f1 100%);
    color: white;
    text-transform: capitalize !important;
}

    .expand-contract-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
    }

    .expand-contract-button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    }

/* ===========================================================
   EXPAND ICON
   =========================================================== */
.expand-icon {
    font-size: 10px;
    color: #6c757d;
    cursor: pointer;
    transition: transform 0.2s ease;
    min-width: 20px;
    margin-right: 0.5rem;
}

/* ===========================================================
   HIERARCHY BLOCKS
   =========================================================== */
.domain-block {
    border-bottom: 2px solid #dee2e6;
    position: relative;
    background-color: #ffffff;
}

.process-block {
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    background-color: #fafbfc;
    margin-left: 0px;
}

.practice-block {
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    background-color: #fefefe;
    margin-left: 0px;
}

/* ===========================================================
   DOMAIN LEVEL
   =========================================================== */
.domain-title {
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .domain-title:hover {
        background-color: #f0f2ff;
    }

    .domain-title .expand-icon {
        min-width: 24px;
        margin-right: 0.75rem;
        font-size: 10px;
        color: #667eea;
        font-weight: bold;
        flex-shrink: 0;
    }

    .domain-title .domain-name {
        flex: 1;
        color: #667eea;
        font-size: 15px;
        font-weight: 700;
    }

.domain-title-row {
    margin: 0;
}

/* ===========================================================
   PROCESS LEVEL
   =========================================================== */
.process-title {
    padding: 0.65rem 1rem;
    padding-left: 2rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0px;
    position: relative;
}

    .process-title:hover {
        background-color: #dcfce7;
    }

    .process-title .expand-icon {
        min-width: 22px;
        margin-right: 0.6rem;
        font-size: 10px;
        color: #10b981;
        font-weight: bold;
        flex-shrink: 0;
    }

    .process-title .process-name {
        flex: 1;
        color: #10b981;
        font-size: 14px;
        font-weight: 600;
    }

.process-title-row {
    margin: 0;
}

/* ===========================================================
   PRACTICE LEVEL
   =========================================================== */
.practice-title {
    padding: 0.55rem 1rem;
    padding-left: 3rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0px;
    position: relative;
}

    .practice-title:hover {
        background-color: #fef3c7;
    }

    .practice-title .expand-icon {
        min-width: 20px;
        margin-right: 0.5rem;
        font-size: 10px;
        color: #f59e0b;
        font-weight: bold;
        flex-shrink: 0;
    }

    .practice-title .practice-name {
        flex: 1;
        color: #f59e0b;
        font-size: 12px;
        font-weight: 500;
    }

    .practice-title .practice-status-container {
        display: flex;
        gap: 100px;
        margin-left: auto;
        padding-right: 70px;
    }

    .practice-title .practice-status {
        font-size: 12px;
        font-weight: 600;
        min-width: 80px;
        text-align: center;
    }

.practice-title-row {
    margin: 0;
}

/* ===========================================================
   QUESTION LEVEL (Assessment Info & Comparison)
   =========================================================== */
.question-block {
    border-bottom: 1px solid #f5f5f5;
    padding: 0.5rem 1rem;
    padding-left: 4rem;
    font-size: 12px;
    color: #374151;
    transition: all 0.2s ease;
    position: relative;
    margin-left: 0px;
}

    .question-block:hover {
        background-color: #f0f0f0;
    }

.question-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

    .question-title .question-text {
        flex: 1;
        color: #374151;
        font-size: 12px;
        font-weight: 400;
    }

    .question-title .question-answers {
        display: flex;
        gap: 60px;
        margin-left: auto;
        padding-right: 70px;
    }

    .question-title .question-answer {
        font-size: 11px;
        font-weight: 600;
        min-width: 80px;
        text-align: center;
    }

/* ===========================================================
   CONTENT AREA WITH SCROLLBAR
   =========================================================== */
.assessment-content-area {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

    .assessment-content-area::-webkit-scrollbar {
        width: 8px;
    }

    .assessment-content-area::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .assessment-content-area::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

/* ===========================================================
   INPUT STYLES
   =========================================================== */
.smaller-input {
    max-width: 120px;
    margin: 0 auto;
}

    .smaller-input input {
        font-weight: 600;
        font-size: 14px;
    }

.numeric-input-styled {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .numeric-input-styled input:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }

    .numeric-input-styled input:disabled {
        background-color: #f8f9fa;
        cursor: not-allowed;
        opacity: 0.8;
    }

/* ===========================================================
   INFO ICON (NCRF)
   =========================================================== */
.ncrf {
    cursor: pointer;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

    .ncrf:hover {
        transform: scale(1.1);
    }

/* ===========================================================
   NO DATA MESSAGE
   =========================================================== */
.no-data-message {
    padding: 60px 20px;
    text-align: center;
}

    .no-data-message i {
        font-size: 72px;
        color: #cbd5e1;
    }

    .no-data-message h5 {
        color: #64748b;
        font-weight: 600;
        margin-bottom: 8px;
    }

    .no-data-message p {
        color: #94a3b8;
        font-size: 14px;
    }

/* ===========================================================
   STICKY HEADER ROW
   =========================================================== */
.header-row {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    padding: 6px 12px;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 42px;
    flex-shrink: 0;
}

    .header-row .col-md-10 {
        text-align: left;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        flex: 1;
    }

    .header-row .col-md-2 {
        text-align: right;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
    }

/* ===========================================================
   RESPONSIVE DESIGN - COMMON BREAKPOINTS
   =========================================================== */
@media (max-width: 992px) {
    .smaller-input {
        max-width: 100px;
    }

    .domain-title {
        padding: 0.7rem 0.8rem;
    }

    .process-title {
        margin-left: 0px;
        padding-left: 2rem;
    }

    .practice-title {
        margin-left: 0px;
        padding-left: 2.5rem;
    }

        .practice-title .practice-status-container {
            gap: 40px;
            padding-right: 100px;
        }

    .question-block {
        margin-left: 0px;
        padding-left: 3.5rem;
    }

    .question-title .question-answers {
        gap: 40px;
        padding-right: 50px;
    }
}

@media (max-width: 768px) {
    .header-row {
        padding: 8px;
    }

    .smaller-input {
        max-width: 80px;
    }

    .expand-contract-button {
        min-width: 110px;
        height: 34px;
        font-size: 12px;
        padding: 6px 14px;
    }

    .domain-title {
        padding: 0.6rem 0.75rem;
    }

        .domain-title .domain-name {
            font-size: 14px;
        }

    .process-title {
        margin-left: 0px;
        padding-left: 1.75rem;
    }

        .process-title .process-name {
            font-size: 13px;
        }

    .practice-title {
        margin-left: 0px;
        padding-left: 2.25rem;
    }

        .practice-title .practice-name {
            font-size: 11px;
        }

        .practice-title .practice-status-container {
            gap: 30px;
            padding-right: 60px;
        }

        .practice-title .practice-status {
            font-size: 11px;
            min-width: 60px;
        }

    .question-block {
        margin-left: 0px;
        padding-left: 3rem;
    }

    .question-title .question-text {
        font-size: 11px;
    }

    .question-title .question-answers {
        gap: 30px;
        padding-right: 30px;
    }

    .question-title .question-answer {
        font-size: 10px;
        min-width: 60px;
    }
}

@media (max-width: 576px) {
    .expand-contract-button {
        min-width: 100px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .domain-title {
        padding: 0.5rem 0.5rem;
    }

        .domain-title .domain-name {
            font-size: 13px;
        }

    .process-title {
        margin-left: 0px;
        padding-left: 1.5rem;
    }

        .process-title .process-name {
            font-size: 12px;
        }

    .practice-title {
        margin-left: 0px;
        padding-left: 2rem;
    }

        .practice-title .practice-name {
            font-size: 11px;
        }

        .practice-title .practice-status-container {
            gap: 15px;
            padding-right: 20px;
        }

        .practice-title .practice-status {
            font-size: 10px;
            min-width: 50px;
        }

    .question-block {
        margin-left: 0px;
        padding-left: 2.5rem;
    }

    .question-title .question-text {
        font-size: 10px;
    }

    .question-title .question-answers {
        gap: 15px;
        padding-right: 10px;
    }

    .question-title .question-answer {
        font-size: 9px;
        min-width: 50px;
    }
}
