/* ==============================================
   QUALIBOLT CONCIERGE (v1.0 - TECH MATCHMAKER)
   Features: 
   1. App-like "Wizard" UI (Progress bar, Slide transitions).
   2. Tactile Physics (Scale on click, Shake on error).
   3. Fully Responsive (Grid to Stack).
   4. Auto-Dark Mode Support.
=============================================== */

/* --- 1. MODAL OVERLAY --- */
.concierge-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}

/* Active State (Controlled by JS) */
.concierge-modal-overlay.active {
    opacity: 1; visibility: visible;
}

/* --- 2. MODAL CONTAINER --- */
.concierge-modal {
    background: var(--card-bg, #ffffff);
    width: 90%; max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    position: relative; overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy Entry */
    max-height: 90vh; display: flex; flex-direction: column;
}

.concierge-modal-overlay.active .concierge-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.close-modal-btn {
    position: absolute; top: 15px; right: 15px;
    background: transparent; border: none; font-size: 1.2rem;
    color: var(--text-muted, #718096); cursor: pointer; z-index: 10;
    width: 35px; height: 35px; border-radius: 50%;
    transition: 0.2s;
}
.close-modal-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

/* --- 3. PROGRESS BAR --- */
.concierge-progress {
    width: 100%; height: 4px; background: rgba(0,0,0,0.05);
}
.progress-bar {
    height: 100%; background: var(--accent-teal, #00BFB3);
    width: 0%; transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 191, 179, 0.5);
}

/* --- 4. STEPS ARCHITECTURE --- */
.concierge-step {
    padding: 30px;
    display: none; /* Hidden by default */
    flex-direction: column; height: 100%; overflow-y: auto;
}

.concierge-step.active {
    display: flex;
    animation: slideInRight 0.4s ease forwards;
}

/* Typography */
.concierge-step h3 {
    font-size: 1.5rem; color: var(--text-main, #1a202c); margin-bottom: 5px; text-align: center;
}
.step-sub {
    font-size: 0.95rem; color: var(--text-muted, #718096); text-align: center; margin-bottom: 25px;
}

/* --- 5. OPTION CARDS (Grid) --- */
.grid-options {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
}
/* Mobile Stack */
@media (max-width: 600px) {
    .grid-options { grid-template-columns: 1fr; }
}

.option-card {
    background: var(--page-bg, #f4f6f8);
    border: 2px solid transparent;
    border-radius: 12px; padding: 20px 15px;
    text-align: center; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}

.option-card i {
    font-size: 2rem; color: var(--text-muted); transition: 0.3s;
}
.option-card .opt-text strong { display: block; color: var(--text-main); font-size: 0.95rem; margin-bottom: 4px; }
.option-card .opt-text small { display: block; color: var(--text-muted); font-size: 0.75rem; line-height: 1.3; }

/* Hover & Active States */
.option-card:hover {
    background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: translateY(-3px);
}
.option-card:active { transform: scale(0.96); } /* Tactile Press */

.option-card.selected {
    border-color: var(--accent-teal); background: rgba(0, 191, 179, 0.05);
}
.option-card.selected i { color: var(--accent-teal); transform: scale(1.1); }
.option-card.selected strong { color: var(--accent-teal); }

/* Vertical Layout Modifier (Step 3) */
.grid-options.vertical { grid-template-columns: 1fr; gap: 15px; }
.option-card.wide {
    flex-direction: row; text-align: left; justify-content: flex-start; gap: 20px; padding: 20px;
}
.option-card.wide .icon-box {
    width: 50px; height: 50px; background: rgba(0,0,0,0.05); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.option-card.wide.selected .icon-box { background: var(--accent-teal); color: #fff; }
.option-card.wide.selected .icon-box i { color: #fff; }

/* --- 6. FORM INPUTS (Step 4) --- */
#concierge-form { display: flex; flex-direction: column; gap: 15px; }

.input-group { position: relative; }
.input-group i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 1rem;
}
.input-group input {
    width: 100%; padding: 14px 15px 14px 45px;
    border: 1px solid var(--border-color, #e2e8f0); border-radius: 10px;
    background: var(--page-bg); color: var(--text-main); font-family: inherit;
    transition: 0.3s; font-size: 0.95rem;
}
.input-group input:focus {
    border-color: var(--accent-teal); outline: none; background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 191, 179, 0.1);
}

/* Magic Submit Button */
.submit-magic-btn {
    background: linear-gradient(135deg, var(--accent-teal) 0%, #009e94 100%);
    color: #fff; border: none; padding: 15px; border-radius: 50px;
    font-weight: 600; font-size: 1rem; cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 191, 179, 0.3);
    transition: 0.3s; margin-top: 10px;
}
.submit-magic-btn:hover {
    transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 191, 179, 0.4);
}

/* Navigation Buttons */
.back-btn {
    background: transparent; border: none; color: var(--text-muted);
    margin-top: 20px; font-size: 0.9rem; text-decoration: underline; cursor: pointer;
}
.skip-container { text-align: center; margin-top: 20px; }
.skip-container a { color: var(--text-muted); font-size: 0.85rem; }

/* --- 7. SUCCESS VIEW --- */
#step-success { text-align: center; align-items: center; justify-content: center; }
.success-icon {
    font-size: 4rem; color: #25D366; margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wa-chat-btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: #25D366; color: #fff; text-decoration: none;
    padding: 12px 25px; border-radius: 50px; font-weight: 600;
    margin-top: 20px; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: 0.3s;
}
.wa-chat-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4); }

.close-btn-secondary {
    display: block; margin: 15px auto 0; background: transparent; border: none;
    color: var(--text-muted); cursor: pointer;
}

/* --- 8. ANIMATIONS --- */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Utility Class for JS to toggle */
.shake-animation { animation: shake 0.3s ease-in-out; }

/* --- 9. DARK MODE OVERRIDES --- */
/* This ensures the modal looks premium in Dark Mode */
body.dark-mode .concierge-modal {
    background: var(--card-bg); border-color: rgba(255,255,255,0.1);
}
body.dark-mode .option-card {
    background: rgba(255,255,255,0.03); 
}
body.dark-mode .option-card:hover {
    background: rgba(255,255,255,0.05);
}
body.dark-mode .input-group input {
    background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1);
    color: #fff;
}
body.dark-mode .input-group input:focus {
    background: rgba(0,0,0,0.5); border-color: var(--accent-teal);
}