/* ============================================
   DentaCare Premium Styles
   Mobile-First Responsive Design
   ============================================ */

/* Base Reset & Responsive Foundation */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent scroll when mobile menu is open */
body.no-scroll {
    overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

/* Selection Color */
::selection {
    background-color: #E3F2FD;
    color: #1565C0;
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2196F3, #81C784);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* ============================================
   Sticky Header States
   ============================================ */
#navbar {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#navbar.scroll-down {
    transform: translateY(-100%);
}

#navbar.scroll-up {
    transform: translateY(0);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
}

/* ============================================
   Animations - Base
   ============================================ */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* Seda 4.0 Chat Widget Animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.seda-avatar-pulse {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Premium Chat Widget Styles */
.wizard-message-enter {
    animation: slideInLeft 0.3s ease-out;
}

.wizard-option-card {
    transition: all 0.2s ease;
}

.wizard-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wizard-option-card:active {
    transform: scale(0.98);
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s infinite ease-in-out;
}

/* ============================================
   Scroll-Triggered Animations
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-slide-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-scale.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation for Children */
.animate-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-stagger.animate-in>*:nth-child(1) {
    transition-delay: 0.1s;
}

.animate-stagger.animate-in>*:nth-child(2) {
    transition-delay: 0.2s;
}

.animate-stagger.animate-in>*:nth-child(3) {
    transition-delay: 0.3s;
}

.animate-stagger.animate-in>*:nth-child(4) {
    transition-delay: 0.4s;
}

.animate-stagger.animate-in>*:nth-child(5) {
    transition-delay: 0.5s;
}

.animate-stagger.animate-in>*:nth-child(6) {
    transition-delay: 0.6s;
}

.animate-stagger.animate-in>*:nth-child(7) {
    transition-delay: 0.7s;
}

.animate-stagger.animate-in>*:nth-child(8) {
    transition-delay: 0.8s;
}

.animate-stagger.animate-in>* {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   FAQ Accordion Transitions
   ============================================ */
.faq-content {
    transition: max-height 0.3s ease-out;
}

.faq-btn i {
    transition: transform 0.3s ease;
}

.faq-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* ============================================
   Glassmorphism Utilities
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ============================================
   Gallery Slider
   ============================================ */
#gallery-track {
    cursor: grab;
}

#gallery-track:active {
    cursor: grabbing;
}

/* ============================================
   Text Gradient Utilities
   ============================================ */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   Before/After Interactive Slider
   ============================================ */
.before-after-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
}

.before-after-slider .image-before,
.before-after-slider .image-after {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.before-after-slider .image-after-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    overflow: hidden;
    will-change: width;
}

.before-after-slider .slider-handle {
    position: absolute;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.before-after-slider .handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.before-after-slider .handle-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.before-after-slider .handle-button svg {
    width: 24px;
    height: 24px;
    color: #2196F3;
}

.before-after-slider .slider-labels {
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 5;
}

.before-after-slider .label-before,
.before-after-slider .label-after {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* ============================================
   Booking Wizard Styles
   ============================================ */
.booking-wizard {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
    .booking-wizard {
        padding: 20px;
        border-radius: 16px;
    }
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #E5E7EB;
    z-index: 0;
}

.wizard-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.wizard-steps .step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E5E7EB;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.wizard-steps .step.active .step-number {
    background: #2196F3;
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.wizard-steps .step.completed .step-number {
    background: #81C784;
    color: white;
}

.wizard-steps .step-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-align: center;
}

@media (max-width: 480px) {
    .wizard-steps .step-label {
        display: none;
    }
}

.wizard-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-grid,
.doctor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-btn,
.doctor-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: #F9FAFB;
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.service-btn:hover,
.doctor-btn:hover {
    background: #EBF5FF;
    border-color: #BFDBFE;
}

.service-btn.selected,
.doctor-btn.selected {
    background: #EBF5FF;
    border-color: #2196F3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.service-btn i {
    font-size: 32px;
}

.timeslot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .timeslot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.timeslot {
    padding: 12px;
    background: #F9FAFB;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeslot:hover:not(:disabled) {
    background: #EBF5FF;
    border-color: #BFDBFE;
}

.timeslot.selected {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.timeslot:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.btn-back {
    padding: 14px 28px;
    background: #F3F4F6;
    color: #374151;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #E5E7EB;
}

.btn-next,
.btn-confirm {
    padding: 14px 32px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 200px;
}

.btn-next:hover:not(:disabled),
.btn-confirm:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.booking-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: #81C784;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* ============================================
   Cost Calculator Styles
   ============================================ */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr 400px;
    }
}

.treatment-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.treatment-checkbox:hover {
    border-color: #BFDBFE;
    background: #F9FAFB;
}

.treatment-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2196F3;
    cursor: pointer;
}

.treatment-checkbox input[type="checkbox"]:checked+span {
    color: #2196F3;
    font-weight: 600;
}

.treatment-checkbox .price {
    color: #6B7280;
    font-size: 14px;
}

.count-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.count-selector button {
    width: 32px;
    height: 32px;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.count-selector button:hover {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.count-selector input {
    width: 48px;
    text-align: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 6px;
    font-weight: 600;
}

.calculator-summary {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.calculator-summary h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1F2937;
}

.selected-treatments {
    min-height: 100px;
    margin-bottom: 20px;
}

.selected-treatments .empty-state {
    color: #9CA3AF;
    text-align: center;
    padding: 20px;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #F3F4F6;
}

.cost-breakdown {
    padding: 16px 0;
    border-top: 2px solid #E5E7EB;
    margin-top: 16px;
}

.cost-line {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
}

.cost-line .amount {
    color: #2196F3;
}

.payment-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.payment-tab {
    flex: 1;
    padding: 12px;
    background: #F3F4F6;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-tab.active {
    background: #2196F3;
    color: white;
}

.monthly-payment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #EBF5FF;
    border-radius: 12px;
    margin-bottom: 20px;
}

.monthly-payment strong {
    font-size: 24px;
    color: #2196F3;
}

/* ============================================
   Chat Widget Styles
   ============================================ */
.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 1999;
}

@media (max-width: 640px) {
    .chat-widget {
        bottom: 90px;
        right: 16px;
    }
}

.chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chat-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(33, 150, 243, 0.5);
}

.chat-trigger svg {
    width: 28px;
    height: 28px;
}

.chat-notification {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.chat-window {
    position: fixed;
    bottom: 170px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 200px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 640px) {
    .chat-window {
        bottom: 160px;
        right: 16px;
        width: calc(100vw - 32px);
        height: calc(100vh - 200px);
    }
}

.chat-window.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

.chat-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.agent-info .status {
    font-size: 12px;
    opacity: 0.9;
}

.agent-info .status.online::before {
    content: '●';
    color: #81C784;
    margin-right: 4px;
}

.chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.message-content {
    background: #F3F4F6;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    max-width: 75%;
}

.chat-message.user .message-content {
    background: #2196F3;
    color: white;
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.message-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 11px;
    color: #9CA3AF;
    display: block;
    margin-top: 4px;
}

.chat-message.user .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.quick-reply {
    background: white;
    border: 1px solid #E5E7EB;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply:hover {
    background: #EBF5FF;
    border-color: #2196F3;
    color: #2196F3;
}

.chat-footer {
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px;
}

.chat-footer form {
    display: flex;
    gap: 8px;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-footer input:focus {
    border-color: #2196F3;
}

.chat-footer button[type="submit"] {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2196F3;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chat-footer button[type="submit"]:hover {
    background: #1976D2;
}

.chat-whatsapp {
    text-align: center;
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
}

.chat-whatsapp a {
    color: #25D366;
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   Stats Counter Section
   ============================================ */
.stat-counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Loading Skeleton
   ============================================ */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* ============================================
   Hover Effects
   ============================================ */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

/* ============================================
   Pulse Animation for CTAs
   ============================================ */
@keyframes cta-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(33, 150, 243, 0);
    }
}

.animate-cta-pulse {
    animation: cta-pulse 2s infinite;
}

/* ============================================
   Responsive Touch Targets
   ============================================ */
@media (max-width: 768px) {

    button,
    a.btn,
    .btn,
    input[type="submit"],
    select {
        min-height: 44px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    textarea {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .chat-widget,
    .scroll-progress,
    #navbar,
    footer {
        display: none !important;
    }
}

/* ============================================
   Before/After Interactive Slider - FIXED
   ============================================ */
.ba-slider-container {
    display: none;
}

.ba-slider-container.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ba-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

@media (min-width: 768px) {
    .ba-slider {
        height: 500px;
    }
}

.ba-before,
.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ba-after {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.05s ease-out;
}

.ba-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: white;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    transition: left 0.05s ease-out;
}

.ba-handle::before,
.ba-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
}

.ba-handle::before {
    top: 50%;
    margin-top: -30px;
    border-width: 8px 0 8px 10px;
    border-color: transparent transparent transparent white;
    margin-left: 20px;
}

.ba-handle::after {
    top: 50%;
    margin-top: -30px;
    border-width: 8px 10px 8px 0;
    border-color: transparent white transparent transparent;
    margin-left: -20px;
}

.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.5);
    border: 3px solid white;
    cursor: grab;
}

.ba-handle-circle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.ba-label {
    position: absolute;
    top: 20px;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-weight: 700;
    font-size: 13px;
    border-radius: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
    z-index: 5;
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
}

/* ============================================
   Booking Wizard - FIXED
   ============================================ */
.wizard-panel {
    display: none;
}

.wizard-panel.active {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.wizard-step.active>div:first-child {
    background: white !important;
    color: #2563eb !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.wizard-step.completed>div:first-child {
    background: #22c55e !important;
    color: white !important;
}

.wizard-step.active span,
.wizard-step.completed span {
    color: white !important;
    opacity: 1 !important;
}

.wizard-line.active {
    background: white !important;
}

.service-option,
.doctor-option,
.date-option,
.time-option {
    transition: all 0.2s ease;
}

.service-option.selected,
.doctor-option.selected,
.date-option.selected,
.time-option.selected {
    border-color: #2563eb !important;
    background: rgba(37, 99, 235, 0.1) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.service-option.selected i,
.service-option.selected svg {
    color: #2563eb !important;
}

/* ============================================
   Cost Calculator - FIXED
   ============================================ */
.treatment-item {
    transition: all 0.2s ease;
}

.treatment-item:has(.treatment-checkbox:checked) {
    background: rgba(37, 99, 235, 0.05);
    border-color: #2563eb;
}

.treatment-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #2563eb;
    cursor: pointer;
}

.count-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.count-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.count-btn:hover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.count-value {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
}

.payment-tab {
    transition: all 0.2s ease;
    cursor: pointer;
}

.payment-tab.active {
    background: #2563eb !important;
    color: white !important;
}

/* ============================================
   Chat Widget - FIXED
   ============================================ */
#chat-widget {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    max-height: 500px;
    z-index: 1000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#chat-widget.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

#chat-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

#chat-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5);
}

#chat-body {
    height: 300px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9fafb;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    animation: fadeInUp 0.3s ease;
}

.chat-message.bot {
    background: white;
    color: #374151;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-message.user {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.quick-reply-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    text-align: left;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
}

.quick-reply-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    width: 85%;
}

@media (max-width: 480px) {
    #chat-widget {
        bottom: 90px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    #chat-trigger {
        bottom: 16px;
        right: 16px;
    }
}

/* ============================================
   Enhanced Chat Widget Styles
   ============================================ */
.agent-avatar-container {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
}

.agent-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #e2e8f0;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-indicator.online {
    background-color: #22c55e;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.chat-trigger-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.4);
    z-index: -1;
    animation: trigger-pulse 2s infinite;
}

@keyframes trigger-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.agent-role {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.chat-footer {
    padding: 12px;
    background: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-whatsapp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #16a34a;
    background: #f0fdf4;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid #dcfce7;
}

.chat-whatsapp-link:hover {
    background: #25D366;
    color: white;
    border-color: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

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

.chat-system-message {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    margin: 8px 0;
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 12px;
    align-self: center;
    max-width: 90%;
}

.typing-indicator {
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    display: flex;
    gap: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.quick-reply-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.quick-reply-btn {
    text-align: left;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 13px;
    color: #374151;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.quick-reply-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

/* =========================================================================
   SEDA 3.0: INTELLIGENT WIZARD STYLES
   ========================================================================= */

/* 1. Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
}

/* 2. Wizard Animations */
@keyframes wizardSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-message-enter {
    animation: wizardSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. Wizard Card Styles */
.wizard-option-card {
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wizard-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.wizard-option-card:active {
    transform: scale(0.98);
}

/* 4. Thinking Indicator Override */
.typing-container {
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: fit-content;
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* 5. Custom Scrollbar for Wizard Body */
#wizard-body::-webkit-scrollbar {
    width: 6px;
}

#wizard-body::-webkit-scrollbar-track {
    background: transparent;
}

#wizard-body::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 20px;
}

#wizard-body::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.5);
}

/* 6. Mobile Fullscreen Overrides (Seda 4.0) */
@media (max-width: 768px) {
    #seda-wizard-container {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 90vh;
        height: 90dvh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        z-index: 99999 !important;
        box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.3);
    }

    #seda-wizard-container.active {
        transform: translateY(0);
    }

    /* Safe area for notched phones */
    #seda-wizard-container .wizard-input-area {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    /* Backdrop overlay when chat is open */
    body.seda-chat-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99998;
        opacity: 1;
        pointer-events: auto;
    }

    /* Hide trigger when chat is open */
    body.seda-chat-open #seda-wizard-trigger {
        opacity: 0;
        pointer-events: none;
    }
}

/* Desktop z-index fix */
@media (min-width: 769px) {
    #seda-wizard-container {
        z-index: 99999 !important;
    }

    #seda-wizard-trigger {
        z-index: 99998 !important;
    }
}

/* Print: Hide chat widget completely */
@media print {

    #seda-wizard-container,
    #seda-wizard-trigger {
        display: none !important;
    }
}