/* =========================================================================
   BBK FORM - CORE STYLES (Based on Affiliate Form Design)
   ========================================================================= */

:root {
    --primary-color: #FFA800;
    --primary-hover: #e69600;
    --text-color: #333333;
    --text-muted: #666666;
    --bg-color: #ffffff;
    --input-bg: #f5f5f5;
    --border-color: #dddddd;
    --error-color: #ff3333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* Prevent default scrolling */
}

/* --- Progress Bar --- */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eeeeee;
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Step Container --- */
.step {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start; /* Changed from center to prevent top cut-off */
    justify-content: center;
    overflow-y: auto; /* Allow scrolling within the step */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: white; /* Prevent overlap see-through */
    padding: 20px;
    padding-bottom: 100px; /* Space for nav buttons */
}

.step.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 10;
}

.step.prev {
    transform: translateY(-20px);
}

/* --- Content Wrapper --- */
.content-wrapper {
    width: 100%;
    max-width: 600px; /* Keep it narrow for better readability */
    margin: auto; /* Vertically center in flex */
    padding-top: 40px;
}

/* --- Typography --- */
.brand-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 500;
}

.welcome-card {
    background: #fffcf5;
    border: 1px solid #ffecb3;
    padding: 30px 20px;
    border-radius: 20px;
}

.welcome-card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.logo-bbk {
    max-width: 150px; /* Lebih kecil & proporsional */
    width: 60%; /* Responsif di HP */
    height: auto;
    object-fit: contain;
    margin: 0 auto 15px auto;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.promo-tags {
    font-size: 1.3rem;
    font-weight: 800;
    color: #10B981; /* Emerald green for Ramadhan vibe */
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(16, 185, 129, 0.1);
}

.step-indicator {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.big-label {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* --- Form Elements --- */
input[type="text"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 18px 20px;
    font-size: 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background-color: white;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none; /* Mobile Safari fix */
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 168, 0, 0.1);
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* --- Options Container (Radio/Buttons) --- */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    text-align: left;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option-btn:hover {
    border-color: var(--primary-color);
    background: #fffdf5;
}

.option-content {
    line-height: 1.4;
}

.highlight-orange {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Buttons --- */
.btn-primary, .btn-next, .btn-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 168, 0, 0.3);
}

.btn-primary:hover, .btn-next:hover, .btn-submit:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 168, 0, 0.4);
}

.btn-submit {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    position: relative;
}

.btn-submit:disabled {
    background-color: #cccccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* --- Keyboard Hint --- */
.keyboard-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* --- Alert Box (Disclaimer) --- */
.alert-box {
    background: #fff5f5;
    border: 2px solid #ffcccc;
    border-left: 6px solid #d32f2f;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* --- Checkbox Agreement --- */
.agreement-box {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 24px;
    width: 24px;
    background-color: white;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-text {
    color: var(--text-color);
}

/* --- Success Screen --- */
.success-container {
    text-align: center;
}

.lottie-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.success-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* --- Navigation Controls (Arrows) --- */
.nav-controls {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.nav-controls button {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-controls button:not(:disabled):hover {
    background: #f5f5f5;
    color: var(--text-color);
}

.nav-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Loader --- */
.loader-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}
.loader {
    border: 3px solid rgba(255, 168, 0, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 500;
    transition: bottom 0.3s ease;
    z-index: 2000;
}

.toast.show {
    bottom: 30px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .nav-controls {
        bottom: 15px; /* Adjust position for mobile */
        right: 15px;
    }
    
    .nav-controls button {
        width: 40px; /* Make buttons slightly smaller */
        height: 40px;
        font-size: 1rem;
    }

    .step {
        align-items: flex-start; /* Move content up on mobile */
        padding-top: 15vh;
    }

    .big-label {
        font-size: 1.5rem;
    }

    input[type="text"], input[type="tel"], input[type="number"], textarea, select {
        font-size: 1.1rem; /* Prevent zoom */
        padding: 15px;
    }
}
