html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
}

*:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.wizard-ek-primary {
    background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%) !important;
    border: none !important;
    color: #fff !important;
}

.wizard-ek-primary:hover,
.wizard-ek-primary:focus {
    background: linear-gradient(135deg, #c2185b 0%, #7b1fa2 100%) !important;
    color: #fff !important;
}

.wizard-progress .progress-bar {
    background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%) !important;
}

.wizard-choice {
    border-radius: 1rem !important;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease;
}

.wizard-choice:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.wizard-choice.active {
    border: 3px solid #d81b60 !important;
    background: rgba(216, 27, 96, 0.06) !important;
}

.wizard-stepper {
    background: linear-gradient(
        180deg,
        rgba(216, 27, 96, 0.05) 0%,
        rgba(142, 36, 170, 0.03) 100%
    );
    border: 1px solid rgba(216, 27, 96, 0.12);
    border-radius: 1.25rem;
    padding: 1rem 1.25rem;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex-shrink: 0;
}

.wizard-step-indicator {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex: 0 0 auto;
}

.wizard-step.is-complete .wizard-step-indicator {
    background: #d81b60;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(216, 27, 96, 0.12);
}

.wizard-step.is-active .wizard-step-indicator {
    background: linear-gradient(135deg, #d81b60 0%, #8e24aa 100%);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(142, 36, 170, 0.12);
}

.wizard-step.is-upcoming .wizard-step-indicator {
    background: #f1f3f5;
    color: #8c97a6;
    border: 1px solid #dee2e6;
}

.wizard-step-label {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}

.wizard-step.is-complete .wizard-step-label {
    color: #d81b60;
}

.wizard-step.is-active .wizard-step-label {
    color: #7b1fa2;
    font-weight: 700;
}

.wizard-step.is-upcoming .wizard-step-label {
    color: #8c97a6;
}

.wizard-step-line {
    height: 1px;
    flex: 1 1 auto;
    min-width: 1.5rem;
    background: linear-gradient(
        90deg,
        rgba(216, 27, 96, 0.3) 0%,
        rgba(142, 36, 170, 0.3) 100%
    );
}

.wizard-preview-empty {
    color: #6c757d;
    font-style: italic;
}

.ck-editor__editable_inline {
    min-height: 150px;
}

.wizard-bottom-nav {
    z-index: 1050;
    padding: 20px 109.5px;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .wizard-bottom-nav {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    }

    .wizard-bottom-nav .container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .wizard-bottom-nav .btn {
        white-space: nowrap;
    }
}

.slide-next > div[style=""],
.slide-next > div:not([style*="display: none"]) {
    animation: slideLeftFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-prev > div[style=""],
.slide-prev > div:not([style*="display: none"]) {
    animation: slideRightFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideLeftFade {
    0% {
        opacity: 0;
        transform: translateX(25px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRightFade {
    0% {
        opacity: 0;
        transform: translateX(-25px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dropdown menu styling for Product Wizard */
.dropdown-container {
    position: relative !important;
    width: 100% !important;
    overflow: visible !important;
}

.dropdown-menu-custom {
    background-color: #ffffff;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    z-index: 9999;
    min-width: 280px;
    overflow: visible;
}

.dropdown-menu-custom > div {
    width: 100%;
    box-sizing: border-box;
}

.dropdown-absolute {
    position: absolute !important;
    width: 100% !important;
    top: 100% !important;
    left: 0 !important;
    transform: none !important;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dropdown-fixed {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90vw !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: 50vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-menu-custom .form-control {
    width: 100% !important;
    box-sizing: border-box !important;
}

.dropdown-menu-custom .position-relative {
    width: 100% !important;
}

.dropdown-menu-custom .dropdown-item {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    list-style: none;
    border-radius: 0.25rem;
    word-break: break-word;
    overflow-wrap: break-word;
    transition: background-color 0.2s ease;
}

.dropdown-menu-custom .dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-menu-custom .dropdown-item:active {
    background-color: #e9ecef;
}

.dropdown-menu-custom .overflow-auto {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scroll-behavior: smooth;
}

.dropdown-menu-custom .fa-times {
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    cursor: pointer !important;
}

.dropdown-menu-custom .fst-italic {
    padding: 0.5rem;
    text-align: center;
    color: #6c757d;
}

.tryout-card-modern,
.kelas-card-modern {
    min-width: 0;
    overflow: hidden;
}

.tryout-card-title,
.kelas-card-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tryout-title-badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.kelas-preview-topic,
.kelas-preview-count {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kelas-accordion-button {
    min-width: 0;
}

.kelas-accordion-button > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 768px) {
    .dropdown-fixed {
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 90vw !important;
        max-width: calc(100vw - 1rem) !important;
        margin-top: 0 !important;
        bottom: auto !important;
        top: auto !important;
        z-index: 1060 !important;
    }

    .dropdown-menu-custom .form-control {
        box-sizing: border-box;
        padding: 0.375rem 0.75rem;
    }

    .dropdown-menu-custom {
        min-width: 0;
        width: 100% !important;
    }

    .dropdown-menu-custom .overflow-auto {
        max-height: 45vh !important;
    }

    .dropdown-menu-custom {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .dropdown-menu-custom .dropdown-item {
        white-space: normal;
    }

    .tryout-card-modern,
    .kelas-card-modern {
        padding: 0.875rem !important;
    }

    .tryout-title-badge {
        display: block;
    }

    .kelas-accordion-button {
        padding: 0.75rem 0.875rem;
    }
}

@media (min-width: 769px) {
    .dropdown-absolute {
        max-height: 130px;
    }

    .dropdown-absolute .overflow-auto {
        max-height: 130px !important;
    }
}
