/**
 * SmartDuck Tally Form - Inline Floating Bottom
 *
 * Same multi-step form as modal but displayed inline
 * Position: absolute bottom of hero, centered, overlapping next section
 *
 * Uses same design/branding as tally-slider.css modal
 */

/* ============================================
   CSS VARIABLES (same as modal)
   ============================================ */

.sd-inline-form {
    --sd-orange: #ff7e04;
    --sd-pink: #da1984;
    --sd-violet: #da1984;
    --sd-gradient: linear-gradient(90deg, var(--sd-orange), var(--sd-pink));
    --sd-grey: rgb(75, 85, 99);
    --sd-light-grey: #f5f5f5;
    --sd-border: #e5e5e5;
    --sd-white: #ffffff;
    --sd-radius: 16px;
    --sd-radius-sm: 8px;
    --sd-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    --sd-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   HERO SECTION - Story 7.1 ROLLBACK
   Inline form removed - excessive padding no longer needed
   ============================================ */

/* Removed: padding-bottom 500-640px was for inline form positioning */

/* Homepage: Hide inline form, but NOT when it becomes a bottom-sheet */
.homepage-form-container .sd-inline-form:not(.sd-mobile-sheet) {
    display: none !important;
}

/* When form is a sheet, override the hiding and show it */
.homepage-form-container .sd-inline-form.sd-mobile-sheet {
    display: block !important;
}

@media (max-width: 767px) {
    /* On mobile, the container stays hidden (form moves to sheet) */
    .homepage-form-container {
        display: none;
    }

    /* When sheet is active, show the container so the fixed-positioned form can display */
    body.sd-mobile-sheet-active .homepage-form-container {
        display: block !important;
    }
}

/* ============================================
   INLINE FORM CONTAINER - Absolute Bottom Center
   ============================================ */

.sd-inline-form {
    position: absolute;
    bottom: -400px;
    left: 50%;
    transform: translateX(-50%);

    width: calc(100% - 2rem);
    max-width: 500px;

    background: var(--sd-white);
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);

    overflow: hidden;
    z-index: 100;

    /* Entry animation */
    animation: inlineFormFloat 0.6s ease-out;
}

@keyframes inlineFormFloat {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .sd-inline-form {
        bottom: -400px;
        max-width: 520px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .sd-inline-form {
        bottom: -400px;
        max-width: 480px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .sd-inline-form {
        bottom: -560px;
        width: calc(100% - 1.5rem);
        max-width: none;
        left: 0.75rem;
        right: 0.75rem;
        transform: none;
        border-radius: 12px;
    }
}

/* ============================================
   SECTION FOLLOWING HERO - Story 7.1 ROLLBACK
   Inline form removed - overlap compensation no longer needed
   ============================================ */

/* Removed: padding-top 120-300px was for inline form overlap */

/* ============================================
   FORM HEADER (gradient bar)
   ============================================ */

.sd-inline-form .sd-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--sd-gradient);
}

.sd-inline-form .sd-title {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--sd-white);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-align: center;
}

@media (min-width: 768px) {
    .sd-inline-form .sd-header {
        padding: 14px 24px;
    }

    .sd-inline-form .sd-title {
        font-size: 18px;
    }
}

/* ============================================
   FORM CONTENT CONTAINER
   ============================================ */

.sd-inline-form .sd-content {
    padding: 0;
}

.sd-inline-form .sd-form-container {
    padding: 14px 20px;
}

@media (min-width: 768px) {
    .sd-inline-form .sd-form-container {
        padding: 24px 28px;
    }
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.sd-inline-form .sd-form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 10px;
    padding: 0 8px;
}

.sd-inline-form .sd-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.sd-inline-form .sd-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sd-light-grey);
    color: var(--sd-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--sd-transition);
}

.sd-inline-form .sd-progress-step.active .sd-step-number,
.sd-inline-form .sd-progress-step.completed .sd-step-number {
    background: var(--sd-gradient);
    color: var(--sd-white);
}

.sd-inline-form .sd-step-label {
    display: none;
}

.sd-inline-form .sd-progress-line {
    flex: 1;
    height: 2px;
    background: var(--sd-border);
    margin: 0 8px;
    margin-bottom: 18px;
    border-radius: 2px;
    min-width: 24px;
    max-width: 50px;
}

/* ============================================
   FORM STEPS
   ============================================ */

.sd-inline-form .sd-form-step {
    display: none;
    animation: fadeInStep 0.3s ease;
}

.sd-inline-form .sd-form-step.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sd-inline-form .sd-step-title {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    text-align: center;
    text-transform: uppercase;
}

.sd-inline-form .sd-step-subtitle {
    font-size: 13px;
    color: var(--sd-grey);
    margin: 0 0 14px 0;
    text-align: center;
    line-height: 1.4;
}

/* ============================================
   FORM GROUPS
   ============================================ */

.sd-inline-form .sd-form-group {
    margin-bottom: 12px;
}

.sd-inline-form .sd-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.sd-inline-form .sd-form-group input,
.sd-inline-form .sd-form-group select {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    background: var(--sd-white);
    color: #1a1a1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.sd-inline-form .sd-form-group input::placeholder {
    color: #aaa;
}

.sd-inline-form .sd-form-group input:focus,
.sd-inline-form .sd-form-group select:focus {
    outline: none;
    border-color: var(--sd-orange);
    box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.1);
}

.sd-inline-form .sd-form-group input.error {
    border-color: #ef4444;
}

.sd-inline-form .sd-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.sd-inline-form .sd-error-message {
    display: block;
    font-size: 11px;
    color: #ef4444;
    margin-top: 3px;
    min-height: 14px;
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.sd-inline-form .sd-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.sd-inline-form .sd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--sd-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.sd-inline-form .sd-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sd-inline-form .sd-btn-primary {
    background: var(--sd-gradient);
    color: var(--sd-white);
}

.sd-inline-form .sd-btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 126, 4, 0.3);
}

.sd-inline-form .sd-btn-secondary {
    background: var(--sd-light-grey);
    color: var(--sd-grey);
    flex: 0 0 auto;
}

.sd-inline-form .sd-btn-secondary:hover {
    background: var(--sd-border);
}

.sd-inline-form .sd-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ============================================
   SPINNER
   ============================================ */

.sd-inline-form .sd-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SUCCESS STATE
   ============================================ */

.sd-inline-form .sd-success-container {
    text-align: center;
    padding: 16px 0;
}

.sd-inline-form .sd-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.sd-inline-form .sd-success-icon svg {
    color: #16a34a;
    width: 32px;
    height: 32px;
}

.sd-inline-form .sd-success-title {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.sd-inline-form .sd-success-message {
    font-size: 14px;
    color: var(--sd-grey);
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.sd-inline-form .sd-success-container .sd-btn {
    width: auto;
    flex: none;
    padding: 12px 32px;
}

/* ============================================
   MOBILE ADJUSTMENTS
   ============================================ */

@media (max-width: 767px) {
    .sd-inline-form .sd-header {
        padding: 14px 16px;
    }

    .sd-inline-form .sd-title {
        font-size: 16px;
    }

    .sd-inline-form .sd-form-container {
        padding: 16px;
    }

    .sd-inline-form .sd-step-title {
        font-size: 16px;
    }

    .sd-inline-form .sd-step-subtitle {
        font-size: 12px;
    }

    .sd-inline-form .sd-form-group input,
    .sd-inline-form .sd-form-group select {
        padding: 12px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .sd-inline-form .sd-form-actions {
        flex-direction: column;
    }

    .sd-inline-form .sd-btn-secondary {
        order: 1;
    }
}

@media (max-width: 400px) {
    .sd-inline-form .sd-form-progress {
        gap: 4px;
    }

    .sd-inline-form .sd-step-label {
        font-size: 9px;
    }

    .sd-inline-form .sd-progress-line {
        min-width: 16px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.sd-inline-form:focus-within {
    outline: 2px solid rgba(255, 126, 4, 0.5);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .sd-inline-form,
    .sd-inline-form * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   TWO-COLUMN LAYOUT (Process + Form)
   Desktop: side by side | Mobile: stacked
   ============================================ */

.sd-inline-layout {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .sd-inline-layout {
        flex-direction: row;
    }
}

/* ============================================
   PROCESS SIDEBAR
   ============================================ */

.sd-process-sidebar {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    padding: 20px;
    border-bottom: 1px solid var(--sd-border);
}

@media (min-width: 1024px) {
    .sd-process-sidebar {
        flex: 0 0 240px;
        border-bottom: none;
        border-right: 1px solid var(--sd-border);
        padding: 24px 20px;
    }
}

.sd-process-title {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sd-process-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sd-process-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sd-process-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--sd-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-process-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.sd-process-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-process-text strong {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.sd-process-text span {
    font-size: 11px;
    color: var(--sd-grey);
    line-height: 1.3;
}

/* Trust badges */
.sd-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--sd-border);
}

.sd-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    padding: 4px 8px;
    border-radius: 20px;
}

.sd-trust-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Google rating badge - special styling */
.sd-trust-badge.sd-trust-google {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    font-weight: 600;
}

.sd-trust-badge.sd-trust-google svg {
    color: #f59e0b;
}

/* Form main area */
.sd-form-main {
    flex: 1;
    min-width: 0;
}

/* ============================================
   CONTACT METHOD CARDS
   ============================================ */

.sd-contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

/* Mobile - keep contact methods horizontal but compact */
@media (max-width: 500px) {
    .sd-contact-methods {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .sd-contact-card {
        padding: 10px 6px;
        gap: 4px;
    }

    .sd-contact-card svg {
        width: 20px;
        height: 20px;
    }

    .sd-contact-card span {
        font-size: 11px;
    }

    .sd-contact-card small {
        font-size: 8px;
    }
}

.sd-contact-option {
    position: relative;
    cursor: pointer;
}

.sd-contact-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sd-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--sd-white);
    border: 2px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    transition: all 0.2s ease;
    text-align: center;
}

.sd-contact-card svg {
    color: var(--sd-grey);
    transition: color 0.2s ease;
}

.sd-contact-card span {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.sd-contact-card small {
    font-size: 10px;
    color: var(--sd-grey);
    line-height: 1.2;
}

/* Hover state */
.sd-contact-option:hover .sd-contact-card {
    border-color: var(--sd-orange);
    background: rgba(255, 126, 4, 0.02);
}

/* Selected state */
.sd-contact-option input[type="radio"]:checked + .sd-contact-card {
    border-color: var(--sd-orange);
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.08), rgba(218, 25, 132, 0.05));
    box-shadow: 0 2px 8px rgba(255, 126, 4, 0.15);
    animation: cardSelect 0.25s ease;
}

@keyframes cardSelect {
    0% { transform: scale(1); }
    40% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

.sd-contact-option input[type="radio"]:checked + .sd-contact-card svg {
    color: var(--sd-orange);
}

/* Focus state */
.sd-contact-option input[type="radio"]:focus + .sd-contact-card {
    outline: 2px solid rgba(255, 126, 4, 0.4);
    outline-offset: 2px;
}

/* ============================================
   TIME SLOT FIELD (Conditional)
   ============================================ */

.sd-time-slot-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--sd-border);
    animation: fadeInSlot 0.3s ease;
}

@keyframes fadeInSlot {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sd-field-hint {
    display: block;
    font-size: 11px;
    color: var(--sd-grey);
    margin-top: 6px;
    line-height: 1.4;
}

/* ============================================
   CONTAINER SIZE ADJUSTMENTS
   For the new 2-column layout
   ============================================ */

@media (min-width: 1024px) {
    .sd-inline-form {
        max-width: 760px;
    }

    /* Story 7.1 ROLLBACK: Removed excessive padding that was for inline form
       Original values: padding-bottom: 220px, padding-top: 160px
       These are no longer needed since the inline form was removed */
}

@media (min-width: 768px) and (max-width: 1023px) {
    .sd-inline-form {
        max-width: 520px;
    }
}

@media (max-width: 767px) {
    /* Story 7.1 ROLLBACK: Removed excessive padding that was for inline form
       Original values: padding-bottom: 480px, padding-top: 420px
       These are no longer needed since the inline form was removed */

    .sd-inline-form {
        bottom: -420px;
    }

    .sd-process-sidebar {
        padding: 16px;
    }

    .sd-process-steps {
        gap: 12px;
    }

    .sd-process-icon {
        width: 32px;
        height: 32px;
    }

    .sd-process-icon svg {
        width: 16px;
        height: 16px;
    }

    .sd-trust-badges {
        justify-content: center;
    }
}

/* ============================================
   FOCUS MODE - Tunnel de conversion immersif
   Activé à partir de l'étape 2
   ============================================ */

/* Backdrop blur overlay */
.sd-focus-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    z-index: 9998;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.sd-focus-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Form in focus mode */
.sd-inline-form.sd-focus-mode {
    position: fixed;
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    z-index: 9999;
    max-height: 90vh;
    overflow-y: auto;
    animation: focusModeEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes focusModeEnter {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Desktop focus mode */
@media (min-width: 1024px) {
    .sd-inline-form.sd-focus-mode {
        max-width: 760px;
        width: 90%;
    }
}

/* Tablet focus mode */
@media (min-width: 768px) and (max-width: 1023px) {
    .sd-inline-form.sd-focus-mode {
        max-width: 600px;
        width: 92%;
    }
}

/* Mobile focus mode */
@media (max-width: 767px) {
    .sd-inline-form.sd-focus-mode {
        width: 95%;
        max-width: none;
        max-height: 85vh;
        border-radius: 12px;
    }
}

/* Hide process sidebar in focus mode to simplify */
.sd-inline-form.sd-focus-mode .sd-process-sidebar {
    display: none;
}

/* Body scroll lock when focus mode active */
body.sd-focus-active {
    overflow: hidden;
}

/* Smooth transition for exiting focus mode */
.sd-inline-form.sd-focus-exit {
    animation: focusModeExit 0.25s ease forwards;
    pointer-events: none;
}

@keyframes focusModeExit {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
}

/* Prevent visual glitch during exit - hide then reappear */
.sd-inline-form.sd-focus-returning {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sd-inline-form.sd-focus-returned {
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* ============================================
   MOBILE OPTIMIZATION PATCH
   Hero spacing, progress bar, touch targets
   ============================================ */

/* Story 7.1 ROLLBACK - Inline form removed
   Hero/section padding overrides no longer needed
   Standard spacing from _tools.css applies automatically */

/* Progress bar - force horizontal layout on mobile */
@media (max-width: 767px) {
    .sd-inline-form .sd-form-progress {
        flex-wrap: nowrap;
        gap: 0;
        padding: 0 2px;
    }

    .sd-inline-form .sd-step-number {
        width: 22px;
        height: 22px;
        font-size: 10px;
        min-width: 22px;
    }

    .sd-inline-form .sd-progress-line {
        min-width: 10px;
        max-width: 24px;
        margin: 0 3px;
        margin-bottom: 14px;
    }

    .sd-inline-form .sd-step-label {
        font-size: 8px;
        max-width: 45px;
    }
}

/* Very small screens - hide step labels */
@media (max-width: 380px) {
    .sd-inline-form .sd-step-label {
        display: none;
    }

    .sd-inline-form .sd-progress-step {
        gap: 0;
    }

    .sd-inline-form .sd-progress-line {
        margin-bottom: 0;
    }
}

/* Focus mode - always horizontal progress */
.sd-inline-form.sd-focus-mode .sd-form-progress {
    flex-wrap: nowrap !important;
}

/* Refined touch targets - subtle but functional */
@media (max-width: 767px) {
    .sd-inline-form .sd-form-group input,
    .sd-inline-form .sd-form-group select {
        padding: 10px 12px;
        min-height: 44px;
        border-width: 1.5px;
    }

    .sd-inline-form .sd-form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .sd-inline-form .sd-form-group {
        margin-bottom: 10px;
    }

    .sd-inline-form .sd-btn {
        padding: 10px 14px;
        font-size: 14px;
        min-height: 44px;
    }

    .sd-inline-form .sd-step-title {
        font-size: 15px;
    }

    .sd-inline-form .sd-step-subtitle {
        font-size: 11px;
        margin-bottom: 12px;
    }
}

/* Focus mode mobile refinements */
@media (max-width: 767px) {
    .sd-inline-form.sd-focus-mode {
        width: 94%;
        max-height: 80vh;
    }

    .sd-inline-form.sd-focus-mode .sd-form-container {
        padding: 12px;
    }

    .sd-inline-form.sd-focus-mode .sd-header {
        padding: 10px 12px;
    }
}

/* Landscape mobile - optimized for horizontal viewing */
@media (max-width: 767px) and (orientation: landscape) {
    .sd-inline-form.sd-focus-mode {
        max-height: 88vh;
        top: 6%;
        transform: translateX(-50%);
    }

    .sd-inline-form.sd-focus-mode .sd-form-container {
        padding: 8px 12px;
    }

    .sd-inline-form.sd-focus-mode .sd-step-title {
        font-size: 13px;
    }

    .sd-inline-form.sd-focus-mode .sd-step-subtitle {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .sd-inline-form.sd-focus-mode .sd-form-group {
        margin-bottom: 6px;
    }

    .sd-inline-form.sd-focus-mode .sd-form-progress {
        margin-bottom: 10px;
    }
}

/* ============================================
   MOBILE BOTTOM BAR PATTERN
   Mobile only (max-width: 767px)
   2 states: compact bar (collapsed), bottom-sheet (expanded)
   Replaces the inline form overlay problem
   ============================================ */

@media (max-width: 767px) {

    /* Hide original inline form when mobile bar is active */
    body.sd-mobile-bar-active .sd-inline-form:not(.sd-mobile-sheet) {
        display: none !important;
    }

    /* ============================================
       STATE 1: COMPACT BAR - Fixed bottom teaser
       ============================================ */

    .sd-mobile-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        border-radius: 16px 16px 0 0;
        z-index: 1000;
        background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        animation: mobileBarEnter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    @keyframes mobileBarEnter {
        0% {
            transform: translateY(100%);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .sd-mobile-bar-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 20px;
        gap: 12px;
    }

    .sd-mobile-bar-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
    }

    .sd-mobile-bar-icon {
        width: 36px;
        height: 36px;
        background: linear-gradient(135deg, #ff7e04 0%, #da1984 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .sd-mobile-bar-icon svg {
        width: 18px;
        height: 18px;
        stroke: #ffffff;
        fill: none;
        stroke-width: 2;
    }

    .sd-mobile-bar-text {
        flex: 1;
    }

    .sd-mobile-bar-headline {
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #ffffff;
        margin: 0;
        line-height: 1.2;
    }

    .sd-mobile-bar-subline {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.7);
        margin: 0;
        margin-top: 2px;
    }

    .sd-mobile-bar-chevron {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: transform 0.3s ease, background 0.2s ease;
    }

    .sd-mobile-bar-chevron svg {
        width: 16px;
        height: 16px;
        stroke: #ffffff;
        fill: none;
        stroke-width: 2.5;
        transition: transform 0.3s ease;
    }

    .sd-mobile-bar:active .sd-mobile-bar-chevron {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }

    /* ============================================
       STATE 2: BOTTOM SHEET - Expanded form
       ============================================ */

    .sd-mobile-sheet {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        max-height: 80vh;
        max-height: 80dvh; /* Dynamic viewport height for mobile browsers */
        height: auto;
        padding-bottom: env(safe-area-inset-bottom, 0);
        border-radius: 20px 20px 0 0 !important;
        z-index: 10001 !important; /* Above header (9999) */
        background: var(--sd-white) !important;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4) !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        animation: mobileSheetSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes mobileSheetSlideUp {
        0% {
            transform: translateY(100%);
        }
        100% {
            transform: translateY(0);
        }
    }

    @keyframes mobileSheetSlideDown {
        0% {
            transform: translateY(0);
        }
        100% {
            transform: translateY(100%);
        }
    }

    .sd-mobile-sheet.sd-sheet-closing {
        animation: mobileSheetSlideDown 0.25s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    }

    /* Drag handle at top of sheet - Premium style */
    .sd-mobile-sheet::before {
        content: '';
        display: block;
        width: 40px;
        height: 5px;
        background: linear-gradient(90deg, var(--sd-orange), var(--sd-violet));
        border-radius: 3px;
        margin: 12px auto 8px;
        flex-shrink: 0;
        opacity: 0.8;
    }

    /* Sheet header with close button - Premium spacing */
    .sd-mobile-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px 16px;
        border-bottom: none;
        position: sticky;
        top: 0;
        background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
        z-index: 10;
    }

    .sd-mobile-sheet-title {
        font-family: 'Neulis Cursive', 'Montserrat', sans-serif;
        font-size: 18px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        background-clip: text;
    }

    .sd-mobile-sheet-close {
        width: 40px;
        height: 40px;
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.15s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .sd-mobile-sheet-close:active {
        background: #e0e0e0;
        transform: scale(0.95);
    }

    .sd-mobile-sheet-close svg {
        width: 20px;
        height: 20px;
        stroke: #4b5563;
        fill: none;
        stroke-width: 2.5;
    }

    /* Sheet form content adjustments - Premium spacing */
    .sd-mobile-sheet .sd-header {
        display: none; /* Hide original gradient header in sheet mode */
    }

    .sd-mobile-sheet .sd-form-container {
        padding: 20px 24px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
    }

    .sd-mobile-sheet .sd-form-progress {
        margin-bottom: 20px;
        padding: 0 8px;
    }

    /* Premium inputs in sheet */
    .sd-mobile-sheet .sd-form-group input,
    .sd-mobile-sheet .sd-form-group select {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 12px;
        border: 2px solid #e5e7eb;
        background: #fafafa;
        transition: all 0.2s ease;
    }

    .sd-mobile-sheet .sd-form-group input:focus,
    .sd-mobile-sheet .sd-form-group select:focus {
        background: #ffffff;
        border-color: var(--sd-orange);
        box-shadow: 0 0 0 4px rgba(255, 126, 4, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .sd-mobile-sheet .sd-form-group label {
        font-size: 13px;
        font-weight: 700;
        color: #374151;
        margin-bottom: 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Premium buttons in sheet */
    .sd-mobile-sheet .sd-btn {
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 700;
        border-radius: 14px;
        transition: all 0.15s ease;
    }

    .sd-mobile-sheet .sd-btn-primary {
        background: linear-gradient(135deg, var(--sd-orange) 0%, var(--sd-violet) 100%);
        box-shadow: 0 4px 16px rgba(255, 126, 4, 0.35);
    }

    .sd-mobile-sheet .sd-btn-primary:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(255, 126, 4, 0.25);
    }

    .sd-mobile-sheet .sd-btn-secondary {
        background: #f3f4f6;
        color: #374151;
        border: 2px solid #e5e7eb;
    }

    .sd-mobile-sheet .sd-btn-secondary:active {
        background: #e5e7eb;
        transform: scale(0.98);
    }

    /* Premium step titles */
    .sd-mobile-sheet .sd-step-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .sd-mobile-sheet .sd-step-subtitle {
        font-size: 14px;
        color: #6b7280;
        margin-bottom: 20px;
    }

    /* Scroll lock when sheet is open */
    body.sd-mobile-sheet-active {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Backdrop for bottom sheet - Above header (z-index 9999) */
    .sd-mobile-sheet-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10000;
        opacity: 0;
        animation: backdropFadeIn 0.25s ease forwards;
        -webkit-tap-highlight-color: transparent;
    }

    @keyframes backdropFadeIn {
        to { opacity: 1; }
    }

    .sd-mobile-sheet-backdrop.sd-backdrop-closing {
        animation: backdropFadeOut 0.2s ease forwards;
    }

    @keyframes backdropFadeOut {
        to { opacity: 0; }
    }

    /* Progress bar compact in sheet */
    .sd-mobile-sheet .sd-step-label {
        display: none;
    }

    .sd-mobile-sheet .sd-step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .sd-mobile-sheet .sd-progress-line {
        width: 24px;
    }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .sd-inline-form {
        position: static;
        transform: none;
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .sd-inline-layout {
        flex-direction: column;
    }

    .sd-process-sidebar {
        border-right: none;
        border-bottom: 1px solid #ccc;
    }

    .sd-focus-backdrop {
        display: none;
    }
}

/* ============================================
   DESKTOP ANCHOR BAR PATTERN
   Desktop only (min-width: 1024px)
   2 states: fold-bar (bottom), focus-large (modal)
   ============================================ */

@media (min-width: 1024px) {

    /* Hide form until anchor bar is initialized (prevents glitch) */
    body.sd-anchor-bar-loading .sd-inline-form {
        opacity: 0;
        pointer-events: none;
    }

    /* ============================================
       FOLD BAR STATE - Fixed bottom, full width
       Stays at bottom throughout step 1
       ============================================ */

    .sd-inline-form.sd-fold-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        z-index: 1000;
        background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
        animation: foldBarEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes foldBarEnter {
        0% {
            transform: translateY(100%);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Hide sidebar in bar mode */
    .sd-inline-form.sd-fold-bar .sd-process-sidebar {
        display: none;
    }

    /* Dark theme header in bar mode */
    .sd-inline-form.sd-fold-bar .sd-header {
        display: none;
    }

    /* Horizontal layout for bar content */
    .sd-inline-form.sd-fold-bar .sd-content {
        padding: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-form-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 16px 40px;
    }

    /* Hide progress bar in bar mode */
    .sd-inline-form.sd-fold-bar .sd-form-progress {
        display: none;
    }

    /* Horizontal step 1 layout in bar mode */
    .sd-inline-form.sd-fold-bar .sd-form-step[data-step="1"] {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex-wrap: nowrap;
    }

    /* Value proposition - compact, conversion-focused */
    .sd-inline-form.sd-fold-bar .sd-bar-intro {
        display: flex;
        flex-direction: column;
        gap: 4px;
        flex-shrink: 0;
        padding-right: 24px;
        border-right: 1px solid rgba(255, 255, 255, 0.15);
        margin-right: 8px;
    }

    .sd-inline-form.sd-fold-bar .sd-bar-headline {
        font-family: 'Neulis Cursive', sans-serif;
        font-size: 17px;
        font-weight: 700;
        color: #ffffff;
        margin: 0;
        line-height: 1.3;
        white-space: nowrap;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    .sd-inline-form.sd-fold-bar .sd-bar-benefits {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.7);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .sd-inline-form.sd-fold-bar .sd-bar-benefits::before {
        content: "✓";
        color: #4ade80;
        font-weight: 600;
    }

    /* Hide original step title/subtitle in bar */
    .sd-inline-form.sd-fold-bar .sd-step-title,
    .sd-inline-form.sd-fold-bar .sd-step-subtitle {
        display: none;
    }

    /* Centre select in bar - wider */
    .sd-inline-form.sd-fold-bar .sd-form-group {
        margin: 0;
        flex: 1;
        max-width: 340px;
        display: flex;
        align-items: center;
    }

    .sd-inline-form.sd-fold-bar .sd-form-group label,
    .sd-inline-form.sd-fold-bar .sd-form-group .sd-error-message {
        display: none;
    }

    .sd-inline-form.sd-fold-bar .sd-form-group select {
        background: rgba(255, 255, 255, 0.08);
        border: 2px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        padding: 12px 44px 12px 16px;
        font-size: 14px;
        border-radius: 8px;
        transition: all 0.2s ease;
        height: 48px;
        width: 100%;
    }

    .sd-inline-form.sd-fold-bar .sd-form-group select:hover {
        border-color: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.12);
    }

    .sd-inline-form.sd-fold-bar .sd-form-group select:focus {
        border-color: var(--sd-orange);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.2);
    }

    .sd-inline-form.sd-fold-bar .sd-form-group select option {
        background: #1a1a2e;
        color: #ffffff;
    }

    /* Dropdown arrow - white for dark background */
    .sd-inline-form.sd-fold-bar .sd-form-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
    }

    /* Hide Continue button until centre is selected */
    .sd-inline-form.sd-fold-bar .sd-form-actions {
        display: none;
    }

    /* Show form actions when centre is selected (selected-centre is visible) */
    .sd-inline-form.sd-fold-bar .sd-selected-centre[style*="display: flex"] ~ .sd-form-actions {
        display: flex;
        margin: 0;
        margin-left: auto;
        flex-shrink: 0;
        align-items: center;
    }

    .sd-inline-form.sd-fold-bar .sd-btn-primary {
        padding: 0 32px;
        font-size: 15px;
        font-weight: 600;
        white-space: nowrap;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(255, 126, 4, 0.4);
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .sd-inline-form.sd-fold-bar .sd-btn-primary:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(255, 126, 4, 0.5);
    }

    /* ============================================
       FOCUS LARGE STATE - Modal 900px, 2 columns
       After centre selection (step 2+)
       ============================================ */

    .sd-inline-form.sd-focus-large {
        position: fixed;
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 900px;
        border-radius: var(--sd-radius);
        z-index: 9999;
        background: var(--sd-white);
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
        max-height: 90vh;
        overflow-y: auto;
        animation: focusLargeEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes focusLargeEnter {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.85);
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    /* Morph animation from bar to modal */
    .sd-inline-form.sd-morphing-to-modal {
        animation: morphBarToModal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    @keyframes morphBarToModal {
        0% {
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            bottom: auto;
            width: 100%;
            max-width: 100%;
            border-radius: 0;
            transform: none;
        }
        50% {
            opacity: 0.9;
        }
        100% {
            position: fixed;
            top: 50%;
            left: 50%;
            right: auto;
            bottom: auto;
            width: 90%;
            max-width: 900px;
            border-radius: 16px;
            transform: translate(-50%, -50%);
        }
    }

    /* Show sidebar in focus-large mode */
    .sd-inline-form.sd-focus-large .sd-process-sidebar {
        display: block;
        flex: 0 0 280px;
    }

    .sd-inline-form.sd-focus-large .sd-header {
        display: flex;
    }

    .sd-inline-form.sd-focus-large .sd-inline-layout {
        flex-direction: row;
    }

    .sd-inline-form.sd-focus-large .sd-form-main {
        flex: 1;
    }

    .sd-inline-form.sd-focus-large .sd-form-container {
        padding: 28px 32px;
    }

    .sd-inline-form.sd-focus-large .sd-form-progress {
        display: flex;
    }

    .sd-inline-form.sd-focus-large .sd-step-title {
        color: #1a1a1a;
        font-size: 20px;
        text-align: center;
    }

    .sd-inline-form.sd-focus-large .sd-step-subtitle {
        display: block;
        font-size: 14px;
    }

    .sd-inline-form.sd-focus-large .sd-form-group {
        margin-bottom: 16px;
    }

    .sd-inline-form.sd-focus-large .sd-form-group label {
        display: block;
        font-size: 13px;
    }

    .sd-inline-form.sd-focus-large .sd-form-step[data-step="1"],
    .sd-inline-form.sd-focus-large .sd-form-step[data-step="2"],
    .sd-inline-form.sd-focus-large .sd-form-step[data-step="3"],
    .sd-inline-form.sd-focus-large .sd-form-step[data-step="4"] {
        display: none;
        flex-direction: column;
    }

    .sd-inline-form.sd-focus-large .sd-form-step.active {
        display: block;
    }

    /* Exit animation - modal back to bar */
    .sd-inline-form.sd-morphing-to-bar {
        animation: morphModalToBar 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    @keyframes morphModalToBar {
        0% {
            position: fixed;
            top: 50%;
            left: 50%;
            width: 90%;
            max-width: 900px;
            border-radius: 16px;
            transform: translate(-50%, -50%);
            opacity: 1;
        }
        100% {
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            width: 100%;
            max-width: 100%;
            border-radius: 0;
            transform: none;
            opacity: 1;
        }
    }

    /* Story 7.1 ROLLBACK - Anchor bar is now position:fixed
       Hero/section padding overrides no longer needed */

    /* Hide default inline form position when in bar mode */
    body.sd-anchor-bar-active .sd-inline-form:not(.sd-fold-bar):not(.sd-focus-large) {
        display: none;
    }
}

/* ============================================
   GEOLOCATION FEATURE STYLES
   Permission overlay + postal code fallback
   ============================================ */

/* Geolocation option in select - emphasized */
.sd-inline-form select option.sd-geo-option {
    font-weight: 600;
    color: var(--sd-orange);
}

/* Centre result badge (shows distance) */
.sd-inline-form .sd-centre-result {
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.08), rgba(218, 25, 132, 0.05));
    border: 1px solid rgba(255, 126, 4, 0.2);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-orange);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sd-inline-form .sd-centre-result.sd-animate-in {
    animation: centreResultPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes centreResultPop {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Postal code fallback */
.sd-inline-form .sd-postal-fallback {
    display: none;
    animation: postalFadeIn 0.3s ease;
}

@keyframes postalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sd-inline-form .sd-postal-fallback label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.sd-inline-form .sd-postal-fallback label svg {
    color: var(--sd-orange);
}

.sd-inline-form .sd-postal-input-group {
    display: flex;
    gap: 8px;
}

.sd-inline-form .sd-postal-input-group input {
    flex: 1;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    background: var(--sd-white);
    color: #1a1a1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.sd-inline-form .sd-postal-input-group input:focus {
    outline: none;
    border-color: var(--sd-orange);
    box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.1);
}

.sd-inline-form .sd-postal-input-group input.error {
    border-color: #ef4444;
    animation: inputShake 0.4s ease;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.sd-inline-form .sd-postal-input-group .sd-btn {
    flex: 0 0 48px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-inline-form .sd-postal-back {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-grey);
    cursor: pointer;
    transition: color 0.2s ease;
}

.sd-inline-form .sd-postal-back:hover {
    color: #1a1a1a;
}

/* ============================================
   GEOLOCATION OVERLAY
   Full-screen permission prompt
   ============================================ */

.sd-geo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sd-geo-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sd-geo-content {
    position: relative;
    text-align: center;
    padding: 40px;
    max-width: 320px;
}

/* Animated arrow pointing to browser permission popup */
.sd-geo-arrow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    animation: geoArrowBounce 1.2s ease-in-out infinite;
}

@keyframes geoArrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

/* Arrow points to top-left on desktop (Chrome permission popup location) */
@media (min-width: 768px) {
    .sd-geo-arrow {
        left: 20px;
        top: -60px;
        transform: rotate(-45deg);
        animation: geoArrowBounceLeft 1.2s ease-in-out infinite;
    }

    @keyframes geoArrowBounceLeft {
        0%, 100% {
            transform: rotate(-45deg) translateY(0);
        }
        50% {
            transform: rotate(-45deg) translateY(-10px);
        }
    }

    .sd-geo-content {
        position: relative;
        top: -80px;
    }
}

.sd-geo-message {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.sd-geo-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--sd-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: geoIconPulse 2s ease-in-out infinite;
}

@keyframes geoIconPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 126, 4, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(255, 126, 4, 0);
    }
}

.sd-geo-icon svg {
    color: #ffffff;
}

.sd-geo-title {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.sd-geo-subtitle {
    font-size: 14px;
    color: var(--sd-grey);
    margin: 0;
}

/* Spinner state (when processing) */
.sd-geo-spinner {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--sd-border);
}

.sd-geo-overlay.processing .sd-geo-spinner {
    display: flex;
}

.sd-geo-overlay.processing .sd-geo-arrow {
    display: none;
}

.sd-geo-spinner span:not(.sd-spinner) {
    font-size: 13px;
    color: var(--sd-grey);
}

.sd-geo-spinner .sd-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 126, 4, 0.2);
    border-top-color: var(--sd-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.sd-geo-cancel {
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.sd-geo-cancel:hover {
    background: rgba(255, 255, 255, 1);
    color: #1a1a1a;
}

/* Mobile adjustments for overlay */
@media (max-width: 767px) {
    .sd-geo-content {
        padding: 24px;
        max-width: 280px;
    }

    .sd-geo-arrow {
        top: -60px;
    }

    .sd-geo-message {
        padding: 24px 20px;
    }

    .sd-geo-icon {
        width: 56px;
        height: 56px;
    }

    .sd-geo-icon svg {
        width: 28px;
        height: 28px;
    }

    .sd-geo-title {
        font-size: 16px;
    }

    .sd-geo-subtitle {
        font-size: 13px;
    }
}

/* Anchor bar mode - adjust fallback styling */
@media (min-width: 1024px) {
    .sd-inline-form.sd-fold-bar .sd-city-autocomplete {
        display: none;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre {
        display: none;
    }
}

/* ============================================
   GEOLOCATION V2 - Premium Selection Flow
   Button + City Autocomplete + Centre Modal
   ============================================ */

/* --- Geolocation Button (Primary CTA) --- */
.sd-geoloc-section {
    margin-bottom: 16px;
}

.sd-geoloc-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(90deg, #ff7e04, #da1984);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 126, 4, 0.3);
}

.sd-geoloc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 126, 4, 0.4);
}

.sd-geoloc-btn:active {
    transform: translateY(0);
}

.sd-geoloc-btn-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-geoloc-btn-icon svg {
    color: #ffffff;
}

.sd-geoloc-btn-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sd-geoloc-btn-text strong {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.sd-geoloc-btn-text small {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.sd-geoloc-btn-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.sd-geoloc-btn:hover .sd-geoloc-btn-arrow {
    transform: translateX(4px);
}

/* --- Separator --- */
.sd-separator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    color: var(--sd-grey);
    font-size: 13px;
}

.sd-separator::before,
.sd-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sd-border);
}

/* --- Postal Code Section --- */
.sd-postal-code-section {
    margin-top: 12px;
}

.sd-postal-input-wrapper {
    display: flex;
    gap: 8px;
    position: relative;
}

.sd-postal-input-wrapper input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #ffffff;
    color: #1a1a1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sd-postal-input-wrapper input:focus {
    outline: none;
    border-color: #ff7e04;
    box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.1);
}

.sd-postal-input-wrapper input::placeholder {
    color: #a3a3a3;
    font-weight: 400;
}

.sd-postal-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #ff7e04 0%, #da1984 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sd-postal-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 126, 4, 0.35);
}

.sd-postal-search-btn:active {
    transform: scale(0.98);
}

.sd-postal-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 60px;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.sd-postal-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sd-postal-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sd-postal-suggestion:hover {
    background: rgba(255, 126, 4, 0.08);
}

.sd-postal-suggestion svg {
    flex-shrink: 0;
    color: #ff7e04;
}

.sd-postal-suggestion span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.sd-postal-suggestion small {
    font-size: 12px;
    color: #737373;
    font-weight: 600;
}

.sd-postal-no-results {
    padding: 14px;
    text-align: center;
    color: #737373;
    font-size: 13px;
}

/* --- Manual Select (Secondary) --- */
.sd-centre-manual {
    position: relative;
}

.sd-centre-manual select {
    background-color: #f8f9fa;
    border-color: var(--sd-border);
}

.sd-centre-manual.sd-show-manual select {
    background-color: var(--sd-white);
}

/* --- Selected Centre Display --- */
.sd-selected-centre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.08), rgba(218, 25, 132, 0.05));
    border: 2px solid rgba(255, 126, 4, 0.3);
    border-radius: var(--sd-radius-md);
    animation: selectedCentreFadeIn 0.3s ease;
}

@keyframes selectedCentreFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sd-selected-centre-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.sd-selected-centre-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--sd-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sd-selected-centre-icon svg {
    color: #ffffff;
}

.sd-selected-centre-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-selected-centre-distance {
    font-size: 13px;
    color: var(--sd-orange);
    font-weight: 500;
    white-space: nowrap;
}

.sd-selected-centre-change {
    flex-shrink: 0;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--sd-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-grey);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sd-selected-centre-change:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* --- City Autocomplete --- */
.sd-city-autocomplete {
    display: none;
    animation: cityAutoFadeIn 0.3s ease;
}

@keyframes cityAutoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sd-city-autocomplete label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.sd-city-autocomplete label svg {
    color: var(--sd-orange);
}

.sd-city-input-wrapper {
    position: relative;
}

.sd-city-autocomplete input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    background: var(--sd-white);
    color: #1a1a1a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sd-city-autocomplete input:focus {
    outline: none;
    border-color: var(--sd-orange);
    box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.1);
}

.sd-city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sd-white);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.sd-city-suggestions.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.sd-city-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sd-city-suggestion:hover {
    background: rgba(255, 126, 4, 0.08);
}

.sd-city-suggestion svg {
    flex-shrink: 0;
    color: var(--sd-orange);
}

.sd-city-suggestion span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
}

.sd-city-suggestion small {
    font-size: 12px;
    color: var(--sd-grey);
}

.sd-city-no-results {
    padding: 16px;
    text-align: center;
    color: var(--sd-grey);
    font-size: 13px;
}

.sd-city-back {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-grey);
    cursor: pointer;
    transition: color 0.2s ease;
}

.sd-city-back:hover {
    color: #1a1a1a;
}

/* --- Centre Selection Modal --- */
.sd-centre-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sd-centre-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sd-centre-modal {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    background: var(--sd-white);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s var(--sd-transition);
}

.sd-centre-modal-overlay.active .sd-centre-modal {
    transform: translateY(0) scale(1);
}

.sd-centre-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sd-centre-modal-back,
.sd-centre-modal-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.1), rgba(218, 25, 132, 0.08));
    border: 1px solid rgba(255, 126, 4, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--sd-orange);
}

.sd-centre-modal-back:hover,
.sd-centre-modal-close:hover {
    background: var(--sd-gradient);
    border-color: transparent;
    color: #ffffff;
    transform: scale(1.05);
}

.sd-centre-modal-back svg,
.sd-centre-modal-close svg {
    transition: color 0.2s ease;
}

.sd-centre-modal-title {
    flex: 1;
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

.sd-centre-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    overscroll-behavior: contain; /* Prevent scroll chaining to parent */
}

/* --- Centre Cards --- */
/* ============================================
   PREMIUM CENTRE CARDS - Photo + Team Design
   ============================================ */

.sd-centre-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* --- Base Card Style --- */
.sd-centre-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s var(--sd-transition);
}

.sd-centre-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.12);
}

/* --- Closest Centre (Featured) --- */
.sd-centre-card-closest {
    border: 2px solid transparent;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                var(--sd-gradient) border-box;
    box-shadow: 0 6px 20px rgba(255, 126, 4, 0.2), 0 2px 8px rgba(218, 25, 132, 0.12);
}

.sd-centre-card-closest:hover {
    box-shadow: 0 16px 40px rgba(255, 126, 4, 0.25), 0 6px 16px rgba(218, 25, 132, 0.18);
    transform: translateY(-4px);
}

/* --- Badge "Le plus proche" --- */
.sd-centre-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(90deg, #ff7e04, #da1984);
    border-radius: 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 20px rgba(255, 126, 4, 0.35), 0 2px 8px rgba(218, 25, 132, 0.25);
}

.sd-centre-card-badge svg {
    flex-shrink: 0;
    fill: #FFD700;
}

.sd-centre-card-badge span {
    color: #ffffff;
    font-weight: 700;
}

/* --- Status Badge (Open/Closed) --- */
.sd-centre-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sd-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sd-status-label {
    white-space: nowrap;
}

/* Status variations */
.sd-status-open .sd-status-dot {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}
.sd-status-open .sd-status-label {
    color: #16a34a;
}

.sd-status-closing .sd-status-dot {
    background: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.5);
}
.sd-status-closing .sd-status-label {
    color: #ca8a04;
}

.sd-status-opening .sd-status-dot {
    background: #f97316;
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.5);
}
.sd-status-opening .sd-status-label {
    color: #ea580c;
}

.sd-status-closed .sd-status-dot {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}
.sd-status-closed .sd-status-label {
    color: #dc2626;
}

.sd-status-planned .sd-status-dot {
    background: #8b5cf6;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.5);
}
.sd-status-planned .sd-status-label {
    color: #7c3aed;
}

/* --- Photo Section --- */
.sd-centre-card-photo {
    position: relative;
    height: 130px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.sd-centre-card-photo-fallback {
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.08) 0%, rgba(218, 25, 132, 0.05) 100%);
}

/* Transition fluide quand la photo se charge */
.sd-centre-card-photo {
    transition: background-image 0.3s ease-out;
}

.sd-centre-card-photo.sd-photo-loaded {
    animation: sd-photo-fade-in 0.4s ease-out;
}

@keyframes sd-photo-fade-in {
    from {
        opacity: 0.6;
    }
    to {
        opacity: 1;
    }
}

.sd-centre-card-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.02) 60%,
        rgba(0,0,0,0.08) 100%
    );
}

.sd-centre-card-closest .sd-centre-card-photo {
    height: 150px;
}

/* --- Card Body --- */
.sd-centre-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

/* --- Card Header (Info + Team) --- */
.sd-centre-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sd-centre-card-info {
    flex: 1;
    min-width: 0;
}

.sd-centre-card-name {
    font-family: 'Neulis Cursive', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    text-transform: uppercase;
    line-height: 1.2;
}

.sd-centre-card-closest .sd-centre-card-name {
    font-size: 19px;
    color: #1a1a1a;
}

.sd-centre-card-address {
    font-size: 13px;
    color: var(--sd-grey);
    margin: 0;
    line-height: 1.4;
}

/* --- Team Avatars (Featured) --- */
.sd-centre-card-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(255, 126, 4, 0.06), rgba(218, 25, 132, 0.04));
    border-radius: 12px;
    border: 1px solid rgba(255, 126, 4, 0.1);
}

.sd-centre-card-avatars {
    display: flex;
    flex-direction: row-reverse;
}

.sd-centre-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    overflow: hidden;
    margin-left: -12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
}

.sd-centre-card-avatar:last-child {
    margin-left: 0;
}

.sd-centre-card-avatar:hover {
    transform: scale(1.15) translateY(-2px);
    z-index: 5;
    box-shadow: 0 6px 16px rgba(255, 126, 4, 0.25);
}

.sd-centre-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sd-centre-card-team-label {
    font-size: 10px;
    color: var(--sd-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Card Footer --- */
.sd-centre-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sd-centre-card-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sd-centre-card-distance,
.sd-centre-card-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.sd-centre-card-distance svg,
.sd-centre-card-time svg {
    color: var(--sd-orange);
    flex-shrink: 0;
}

/* --- Route Time Loading Animation --- */
.sd-centre-card-time.sd-loading {
    color: #94a3b8;
}

.sd-centre-card-time.sd-loading svg {
    color: #94a3b8;
    animation: sd-pulse 1.5s ease-in-out infinite;
}

.sd-loading-dots span {
    animation: sd-dot-blink 1.4s infinite;
    animation-fill-mode: both;
}

.sd-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.sd-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes sd-dot-blink {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

@keyframes sd-pulse {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

/* --- Google Rating --- */
.sd-centre-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 8px;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

.sd-rating-stars {
    display: flex;
    gap: 1px;
}

.sd-star {
    font-size: 12px;
    color: #d1d5db;
    line-height: 1;
}

.sd-star-filled {
    color: #fbbf24;
}

.sd-star-half {
    background: linear-gradient(90deg, #fbbf24 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sd-rating-value {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}

.sd-rating-count {
    font-size: 11px;
    color: #a3a3a3;
    font-weight: 500;
}

/* --- Select Button (Premium SmartDuck Style) --- */
.sd-centre-card-select {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff7e04 0%, #da1984 100%);
    border: none;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 4px 15px rgba(255, 126, 4, 0.3), 0 2px 6px rgba(218, 25, 132, 0.2);
    position: relative;
    overflow: hidden;
}

.sd-centre-card-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sd-centre-card-select:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 126, 4, 0.4), 0 4px 12px rgba(218, 25, 132, 0.3);
}

.sd-centre-card-select:hover::before {
    left: 100%;
}

.sd-centre-card-select:active {
    transform: translateY(0) scale(0.98);
}

.sd-centre-card-select svg {
    stroke: #ffffff !important;
    transition: transform 0.3s ease;
}

.sd-centre-card-select:hover svg {
    transform: translateX(3px);
}

.sd-centre-card-closest .sd-centre-card-select {
    padding: 14px 28px;
    font-size: 15px;
    border-radius: 12px;
}

.sd-centre-modal-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--sd-grey);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sd-centre-modal-all:hover {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

/* --- Loading Skeleton (Premium Design) --- */
.sd-centre-cards-loading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sd-centre-card-skeleton {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.sd-centre-card-skeleton-first {
    border: 2px solid transparent;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                linear-gradient(90deg, rgba(255, 126, 4, 0.3), rgba(218, 25, 132, 0.3)) border-box;
}

.sd-skeleton-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    width: 110px;
    height: 26px;
    background: linear-gradient(90deg, rgba(255, 126, 4, 0.3) 25%, rgba(218, 25, 132, 0.2) 50%, rgba(255, 126, 4, 0.3) 75%);
    background-size: 200% 100%;
    border-radius: 20px;
    animation: skeletonShimmer 1.5s infinite;
}

.sd-skeleton-photo {
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.sd-centre-card-skeleton-first .sd-skeleton-photo {
    height: 120px;
}

.sd-skeleton-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sd-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.sd-skeleton-info {
    flex: 1;
}

.sd-skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeletonShimmer 1.5s infinite;
}

.sd-skeleton-title {
    width: 65%;
    height: 18px;
    margin-bottom: 8px;
}

.sd-skeleton-address {
    width: 85%;
}

.sd-skeleton-avatars {
    display: flex;
    flex-direction: row-reverse;
}

.sd-skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -10px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.sd-skeleton-avatar:last-child {
    margin-left: 0;
}

.sd-skeleton-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sd-skeleton-metrics {
    display: flex;
    gap: 12px;
}

.sd-skeleton-metric {
    width: 55px;
    height: 14px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeletonShimmer 1.5s infinite;
}

.sd-skeleton-button {
    width: 85px;
    height: 38px;
    background: linear-gradient(90deg, rgba(255, 126, 4, 0.2) 25%, rgba(218, 25, 132, 0.15) 50%, rgba(255, 126, 4, 0.2) 75%);
    background-size: 200% 100%;
    border-radius: var(--sd-radius-sm);
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.sd-centre-cards-loading-text {
    text-align: center;
    font-size: 13px;
    color: var(--sd-grey);
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sd-centre-cards-loading-text::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--sd-orange);
    border-top-color: transparent;
    border-radius: 50%;
    animation: loadingSpinner 0.8s linear infinite;
}

@keyframes loadingSpinner {
    to { transform: rotate(360deg); }
}

/* --- Mobile adjustments for Centre Modal --- */
@media (max-width: 767px) {
    .sd-centre-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .sd-centre-modal {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .sd-centre-modal-overlay.active .sd-centre-modal {
        transform: translateY(0);
    }

    /* Premium Card Mobile */
    .sd-centre-card {
        border-radius: 12px;
    }

    .sd-centre-card-photo {
        height: 110px;
    }

    .sd-centre-card-closest .sd-centre-card-photo {
        height: 130px;
    }

    .sd-centre-card-body {
        padding: 12px;
        gap: 10px;
    }

    .sd-centre-card-name {
        font-size: 15px;
    }

    .sd-centre-card-closest .sd-centre-card-name {
        font-size: 16px;
    }

    .sd-centre-card-address {
        font-size: 12px;
    }

    .sd-centre-card-badge {
        top: 8px;
        left: 8px;
        padding: 5px 10px;
        font-size: 10px;
    }

    .sd-centre-card-status {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .sd-status-dot {
        width: 6px;
        height: 6px;
    }

    .sd-centre-card-rating {
        padding: 4px 8px;
        gap: 4px;
    }

    .sd-star {
        font-size: 10px;
    }

    .sd-rating-value {
        font-size: 11px;
    }

    .sd-rating-count {
        font-size: 9px;
    }

    .sd-centre-card-team {
        padding: 6px 10px;
    }

    .sd-centre-card-avatar {
        width: 32px;
        height: 32px;
        margin-left: -10px;
    }

    .sd-centre-card-team-label {
        font-size: 9px;
    }

    .sd-centre-card-footer {
        padding-top: 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .sd-centre-card-metrics {
        gap: 10px;
    }

    .sd-centre-card-distance,
    .sd-centre-card-time {
        font-size: 12px;
    }

    .sd-centre-card-select {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
    }

    .sd-centre-card-closest .sd-centre-card-select {
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Skeleton Mobile */
    .sd-skeleton-photo {
        height: 80px;
    }

    .sd-centre-card-skeleton-first .sd-skeleton-photo {
        height: 100px;
    }

    .sd-skeleton-body {
        padding: 12px;
    }

    .sd-skeleton-avatar {
        width: 28px;
        height: 28px;
        margin-left: -8px;
    }
}

/* --- Anchor Bar Mode Adjustments --- */
@media (min-width: 1024px) {
    /* Hide manual select in fold-bar (used for form submission only) */
    .sd-inline-form.sd-fold-bar .sd-centre-manual {
        display: none !important;
    }

    /* Hide city autocomplete in fold-bar */
    .sd-inline-form.sd-fold-bar .sd-city-autocomplete {
        display: none;
    }

    /* ====== GEOLOC BUTTON - THE DOMINANT CTA ====== */
    .sd-inline-form.sd-fold-bar .sd-geoloc-section {
        display: block;
        margin: 0;
        flex: 1;
        max-width: 320px;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn {
        background: linear-gradient(135deg, #ff7e04 0%, #da1984 100%);
        border: none;
        padding: 12px 24px;
        gap: 12px;
        height: 52px;
        border-radius: 10px;
        box-shadow: 0 4px 20px rgba(255, 126, 4, 0.4);
        width: 100%;
        transition: all 0.2s ease;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 28px rgba(255, 126, 4, 0.5);
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-icon {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-icon svg {
        width: 18px;
        height: 18px;
        stroke: #ffffff;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-text {
        text-align: left;
        flex: 1;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-text strong {
        font-size: 15px;
        font-weight: 700;
        color: #ffffff;
        display: block;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-text small {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.85);
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-arrow {
        display: flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
    }

    .sd-inline-form.sd-fold-bar .sd-geoloc-btn-arrow svg {
        width: 14px;
        height: 14px;
        stroke: #ffffff;
    }

    /* ====== SEPARATOR - Subtle divider ====== */
    .sd-inline-form.sd-fold-bar .sd-separator {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
        margin: 0;
        flex-shrink: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-separator::before,
    .sd-inline-form.sd-fold-bar .sd-separator::after {
        display: none;
    }

    .sd-inline-form.sd-fold-bar .sd-separator span {
        font-size: 12px;
        color: rgba(255, 255, 255, 0.4);
        font-weight: 500;
        text-transform: lowercase;
    }

    /* ====== POSTAL CODE - Subtle alternative (not competing) ====== */
    .sd-inline-form.sd-fold-bar #sd-postal-code-section {
        display: block;
        margin: 0;
        flex-shrink: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-postal-input-wrapper {
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        height: 44px;
        transition: all 0.2s ease;
        overflow: hidden;
    }

    .sd-inline-form.sd-fold-bar .sd-postal-input-wrapper:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .sd-inline-form.sd-fold-bar .sd-postal-input-wrapper:focus-within {
        border-color: var(--sd-orange);
        background: rgba(255, 255, 255, 0.12);
        box-shadow: 0 0 0 3px rgba(255, 126, 4, 0.15);
    }

    .sd-inline-form.sd-fold-bar .sd-postal-icon {
        color: rgba(255, 255, 255, 0.4);
    }

    .sd-inline-form.sd-fold-bar #sd-postal-input {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 14px;
        width: 150px;
    }

    .sd-inline-form.sd-fold-bar #sd-postal-input::placeholder {
        color: rgba(255, 255, 255, 0.45);
        font-size: 13px;
    }

    .sd-inline-form.sd-fold-bar #sd-postal-search-btn {
        background: rgba(255, 255, 255, 0.12);
        border: none;
        width: 38px;
        height: 38px;
        padding: 0;
        margin: 3px;
        border-radius: 6px;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sd-inline-form.sd-fold-bar #sd-postal-search-btn:hover {
        background: linear-gradient(135deg, #ff7e04 0%, #da1984 100%);
    }

    .sd-inline-form.sd-fold-bar #sd-postal-search-btn svg {
        stroke: rgba(255, 255, 255, 0.7);
        width: 18px;
        height: 18px;
    }

    .sd-inline-form.sd-fold-bar .sd-postal-suggestions {
        background: #1a1a2e;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    .sd-inline-form.sd-fold-bar .sd-postal-suggestion {
        color: #ffffff;
    }

    .sd-inline-form.sd-fold-bar .sd-postal-suggestion:hover {
        background: rgba(255, 126, 4, 0.2);
    }

    /* ====== SELECTED CENTRE DISPLAY - Success state ====== */
    .sd-inline-form.sd-fold-bar .sd-selected-centre {
        display: none;
        background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(34, 197, 94, 0.1) 100%);
        border: 2px solid rgba(74, 222, 128, 0.4);
        border-radius: 10px;
        padding: 10px 16px;
        height: 52px;
        margin: 0;
        flex: 1;
        max-width: 360px;
        gap: 12px;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre[style*="display: flex"] {
        display: flex !important;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-icon {
        background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-icon svg {
        width: 16px;
        height: 16px;
        stroke: #ffffff;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-info {
        flex: 1;
        min-width: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-name {
        color: #ffffff;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-distance {
        color: rgba(255, 255, 255, 0.6);
        font-size: 11px;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-change {
        color: rgba(255, 255, 255, 0.7);
        font-size: 12px;
        font-weight: 500;
        padding: 6px 12px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .sd-inline-form.sd-fold-bar .sd-selected-centre-change:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    /* Show geoloc button in large modal mode */
    .sd-inline-form.sd-focus-large .sd-geoloc-section {
        display: block;
    }

    .sd-inline-form.sd-focus-large .sd-separator {
        display: flex;
    }
}
