/* ================================================================
   DIAGNOSTIC SECTION & CUSTOM SELECT FIX (Restored)
   ================================================================ */

.diagnostic {
    width: 100%;
    padding: var(--section-padding-y) var(--section-padding-x);
    margin-top: 6.25rem;
    position: relative;
    z-index: 50 !important; /* Force Z-Index */
    background: transparent;
}

.diagnostic__container {
    max-width: 1440px;
    margin: 0 auto;
    background: #0a0a0c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    position: relative;
    overflow: visible !important; /* Force visible overflow for dropdowns */
}

.diagnostic__title {
    color: #fff;
    font-family: var(--font-display);
    font-size: 3rem;
    text-align: center;
}

.diagnostic__subtitle {
    color: var(--c-text-muted);
    font-size: 1.2rem;
    text-align: center;
    margin-top: -1.5rem;
}

.diagnostic__form {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.diagnostic__field {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 15rem;
    flex: 1;
}

.diagnostic__label {
    color: #fff;
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* CUSTOM SELECT */
.diagnostic__select {
    position: relative;
    width: 100%;
    z-index: 1; /* Local z-index */
}

.diagnostic__select.active {
    z-index: 100; /* Bring forward when active */
}

.diagnostic__select-display {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    cursor: pointer;
    color: #fff;
    font-family: var(--font-main);
    transition: all 0.3s ease;
}

.diagnostic__select-display:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.diagnostic__select.active .diagnostic__select-display {
    border-color: var(--c-accent);
    background: rgba(59, 130, 246, 0.1);
}

.diagnostic__select-arrow {
    transition: transform 0.3s ease;
}

.diagnostic__select.active .diagnostic__select-arrow {
    transform: rotate(180deg);
}

.diagnostic__select-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background: #15151a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 0.5rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    max-height: 250px;
    overflow-y: auto;
}

.diagnostic__select.active .diagnostic__select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.diagnostic__select-dropdown li {
    padding: 0.8rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.diagnostic__select-dropdown li:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.diagnostic__select-dropdown li.selected {
    background: rgba(59, 130, 246, 0.2);
    color: var(--c-accent);
}

.diagnostic__action {
    display: flex;
    align-items: flex-end;
}

.diagnostic__brief-checkbox-row {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Checkbox Style */
.checkbox {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    user-select: none;
}

.checkbox__input {
    display: none;
}

.checkbox__checkmark {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.4rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox__input:checked ~ .checkbox__checkmark {
    background: var(--c-accent);
    border-color: var(--c-accent);
}

.checkbox__checkmark::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox__input:checked ~ .checkbox__checkmark::after {
    opacity: 1;
}

.checkbox__label {
    color: var(--c-text-muted);
    font-size: 1rem;
}

/* MEDIA QUERIES FOR DIAGNOSTIC */
@media (max-width: 1024px) {
  .diagnostic__form {
    flex-direction: column;
    align-items: stretch;
  }
}
