/* --- Global Modal Centering and Uniform Height --- */
.modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 1rem);
    margin: auto;
}

.modal-content {
    height: 85vh !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.5rem;
    scrollbar-width: thin;
}

.modal-header,
.modal-footer {
    flex-shrink: 0;
    padding: 1.2rem 1.5rem;
}

@media (min-width: 992px) {

    /* Force XL modals to be 75% of screen width */
    .modal-xl {
        max-width: 75% !important;
        width: 75%;
    }

    /* Specific width for the 'More List' modal */
    #modalmorelist-modal .modal-dialog {
        max-width: 65% !important;
        width: 65%;
    }
}

@media (max-width: 991.98px) {

    .modal-dialog {
        max-width: 95% !important;
        margin: 0.5rem auto;
    }

    .modal-content {
        height: 90vh !important;
    }
}

.custommodallink {
    font-size: 18px !important;
    color: #000;
}
.custommodallink:hover  {
    background-color: #ABE6FF !important;
    cursor: pointer !important;
    color: #fff;
}

.carditem {
    border: 1px solid #e9ecef !important;
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
    cursor: pointer;
}
.carditem:hover {
    border: 1px solid #182b45 !important;
    background-color: #e3f2fd !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.carditem .card-title,
.carditem .card-text,
.carditem .fa {
    color: #182b45 !important;
}
.carditem:hover .card-title,
.carditem:hover .card-text,
.carditem:hover .fa {
    color: #182b45 !important;
}

.btn.btn-view-more{
    color: #000 !important;
    background-color: #ABE6FF !important;
    border-color: #ABE6FF !important;
    text-align: center;
}

/* --- Close Button: Rounded Square --- */
.btn-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    width: 32px;
    height: 32px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    z-index: 1060;
    transition: all 0.2s ease;
    padding: 0;
}
.btn-modal-close:hover {
    background-color: #182b45;
    color: #ffffff;
    border-color: #182b45;
}
.btn-modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 43, 69, 0.2);
}

.modal-header.position-relative {
    position: relative !important;
}

/* --- Scrollable Text Areas (Phase Details) --- */
.scrollable-text {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 12px;
    background: #fafafa;
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.fy-filter-btn {
    border: 2px solid #f8f9fa !important;
    opacity: 0.65;
    cursor: pointer;
}
.fy-filter-btn .fy-status-text { color: #6c757d; transition: color 0.3s ease; }
.fy-filter-btn .fy-year-text { color: #212529; transition: color 0.3s ease; }

/* Hover State */
.fy-filter-btn:hover {
    opacity: 0.9;
    border-color: #d1e7dd !important; /* Soft green border */
    transform: translateY(-2px);
    background-color: #f8f9fa !important;
}

/* Active / Selected State */
.fy-filter-btn.active {
    opacity: 1;
    border-color: #198754 !important; /* Success Green */
    background-color: #f0fdf4 !important; /* Very light green tint */
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.15) !important;
    transform: translateY(0);
}

/* Active Text Colors */
.fy-filter-btn.active .fy-status-text,
.fy-filter-btn.active .fy-year-text {
    color: #198754 !important;
}

.fy-sidebar {
    width: 100%;
}

@media (max-width: 767.98px) {
    .fy-sidebar {
        border-bottom: 1px solid #dee2e6;
        padding: 0.75rem 1rem !important;
    }

    .fy-filter-btn {
        min-width: 140px;
    }

    .fy-sidebar .overflow-auto::-webkit-scrollbar {
        height: 4px;
    }
}

@media (min-width: 768px) {
    .fy-sidebar {
        width: 280px;
        border-right: 1px solid #dee2e6;
    }
}
