/*
 * Guest Mobile Pro - Professional Mobile-First Design
 * Optimized for touch, performance, and accessibility
 * Version: 2.0
 */

/* ============================================
   CSS VARIABLES - MOBILE OPTIMIZED
   ============================================ */
:root {
    /* Brand Colors - Navy & Gold */
    --gp-primary: #162a42;
    --gp-primary-light: #1e3a5f;
    --gp-primary-dark: #0f1c2d;
    --gp-accent: #b8973d;
    --gp-accent-light: #d4b25a;
    
    /* Semantic Colors */
    --gp-success: #0d7a5e;
    --gp-error: #b91c1c;
    --gp-warning: #b45309;
    --gp-info: #0369a1;
    
    /* Neutral Palette */
    --gp-text: #1a2332;
    --gp-text-secondary: #4a5568;
    --gp-text-muted: #8896a8;
    --gp-border: #e4e8ed;
    --gp-bg: #f7f8fa;
    --gp-surface: #ffffff;
    
    /* Spacing Scale (4px base) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    
    /* Typography Scale */
    --text-xs: 0.75rem;   /* 12px */
    --text-sm: 0.875rem;  /* 14px */
    --text-base: 1rem;    /* 16px - minimum for mobile */
    --text-lg: 1.125rem;  /* 18px */
    --text-xl: 1.25rem;   /* 20px */
    --text-2xl: 1.5rem;   /* 24px */
    --text-3xl: 1.875rem; /* 30px */
    
    /* Shadows - Subtle & Professional */
    --shadow-sm: 0 1px 3px rgba(22, 42, 66, 0.04);
    --shadow-md: 0 4px 16px rgba(22, 42, 66, 0.08);
    --shadow-lg: 0 8px 32px rgba(22, 42, 66, 0.12);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Touch Targets */
    --touch-min: 44px; /* iOS minimum */
    
    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   MOBILE BASE STYLES
   ============================================ */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--gp-text);
    background: var(--gp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

/* Arabic Font Support */
[lang="ar"] body,
[lang="ar"] * {
    font-family: 'Cairo', -apple-system, sans-serif;
}

/* Prevent zoom on input focus */
input, textarea, select {
    font-size: 16px !important;
}

/* ============================================
   MOBILE BUTTONS - TOUCH OPTIMIZED
   ============================================ */
.guest-btn,
.gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    user-select: none;
    touch-action: manipulation;
    width: 100%;
}

/* Primary Button - Gradient */
.guest-btn-primary,
.gp-btn-primary {
    background: linear-gradient(135deg, var(--gp-primary) 0%, var(--gp-primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.guest-btn-primary:active,
.gp-btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-sm);
}

/* Secondary Button */
.guest-btn-secondary,
.gp-btn-secondary {
    background: white;
    color: var(--gp-primary);
    border: 2px solid var(--gp-primary);
    box-shadow: var(--shadow-sm);
}

.guest-btn-secondary:active,
.gp-btn-secondary:active {
    background: var(--gp-bg);
    transform: scale(0.98);
}

/* Outline Button */
.guest-btn-outline {
    background: transparent;
    color: var(--gp-text);
    border: 1px solid var(--gp-border);
}

/* Icon Button */
.guest-btn-icon {
    width: var(--touch-min);
    height: var(--touch-min);
    padding: 0;
    border-radius: var(--radius-full);
}

/* Button Sizes */
.guest-btn-sm {
    min-height: 36px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.guest-btn-lg {
    min-height: 52px;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* Disabled State */
.guest-btn:disabled,
.gp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   MOBILE CARDS
   ============================================ */
.guest-card,
.gp-card {
    background: var(--gp-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    transition: transform var(--transition-fast);
}

.guest-card:active {
    transform: scale(0.98);
}

.guest-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gp-border);
}

.guest-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gp-text);
    margin: 0;
}

.guest-card-body {
    color: var(--gp-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.guest-card-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--gp-border);
}

/* ============================================
   MOBILE FORMS - TOUCH FRIENDLY
   ============================================ */
.guest-form-group {
    margin-bottom: var(--space-5);
}

.guest-form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gp-text);
    margin-bottom: var(--space-2);
}

.guest-form-input,
.guest-form-select,
.guest-form-textarea {
    width: 100%;
    min-height: var(--touch-min);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--gp-text);
    background: var(--gp-surface);
    border: 2px solid var(--gp-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    -webkit-appearance: none;
    appearance: none;
}

.guest-form-input:focus,
.guest-form-select:focus,
.guest-form-textarea:focus {
    outline: none;
    border-color: var(--gp-primary);
    box-shadow: 0 0 0 3px rgba(22, 42, 66, 0.1);
}

/* Input with Icon */
.guest-input-group {
    position: relative;
}

.guest-input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gp-text-muted);
    pointer-events: none;
    font-size: var(--text-base);
}

.guest-input-group .guest-form-input {
    padding-left: calc(var(--space-4) * 2.5);
}

/* RTL Support */
[dir="rtl"] .guest-input-icon {
    left: auto;
    right: var(--space-4);
}

[dir="rtl"] .guest-input-group .guest-form-input {
    padding-left: var(--space-4);
    padding-right: calc(var(--space-4) * 2.5);
}

/* Error State */
.guest-form-input.error,
.guest-form-select.error {
    border-color: var(--gp-error);
}

.guest-error {
    display: block;
    color: var(--gp-error);
    font-size: var(--text-xs);
    margin-top: var(--space-1);
}

/* ============================================
   MOBILE HEADER - STICKY
   ============================================ */
.guest-header {
    position: sticky;
    top: 0;
    background: var(--gp-surface);
    border-bottom: 1px solid var(--gp-border);
    padding: var(--space-4);
    padding-top: calc(var(--space-4) + var(--safe-top));
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.guest-header-content {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.guest-header-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-min);
    height: var(--touch-min);
    color: var(--gp-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.guest-header-back:active {
    background: var(--gp-bg);
}

.guest-header-title {
    flex: 1;
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--gp-text);
    margin: 0;
}

/* ============================================
   MOBILE LISTS
   ============================================ */
.guest-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--gp-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.guest-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    min-height: var(--touch-min);
    padding: var(--space-4);
    border-bottom: 1px solid var(--gp-border);
    transition: background var(--transition-fast);
}

.guest-list-item:active {
    background: var(--gp-bg);
}

.guest-list-item:last-child {
    border-bottom: none;
}

.guest-list-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gp-bg);
    border-radius: var(--radius-md);
    color: var(--gp-primary);
    font-size: var(--text-lg);
}

.guest-list-content {
    flex: 1;
    min-width: 0;
}

.guest-list-title {
    font-weight: 600;
    color: var(--gp-text);
    margin-bottom: var(--space-1);
    font-size: var(--text-base);
}

.guest-list-subtitle {
    font-size: var(--text-sm);
    color: var(--gp-text-secondary);
}

.guest-list-action {
    flex-shrink: 0;
    color: var(--gp-text-muted);
    font-size: var(--text-lg);
}

/* ============================================
   MOBILE BADGES
   ============================================ */
.guest-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.guest-badge-primary {
    background: rgba(22, 42, 66, 0.1);
    color: var(--gp-primary);
}

.guest-badge-success {
    background: rgba(13, 122, 94, 0.1);
    color: var(--gp-success);
}

.guest-badge-warning {
    background: rgba(180, 83, 9, 0.1);
    color: var(--gp-warning);
}

.guest-badge-error {
    background: rgba(185, 28, 28, 0.1);
    color: var(--gp-error);
}

.guest-badge-info {
    background: rgba(3, 105, 161, 0.1);
    color: var(--gp-info);
}

/* ============================================
   MOBILE ALERTS
   ============================================ */
.guest-alert {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    display: flex;
    gap: var(--space-3);
    border-left: 4px solid;
}

.guest-alert-icon {
    flex-shrink: 0;
    font-size: var(--text-xl);
}

.guest-alert-content {
    flex: 1;
}

.guest-alert-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
    font-size: var(--text-base);
}

.guest-alert-success {
    background: rgba(13, 122, 94, 0.1);
    color: var(--gp-success);
    border-color: var(--gp-success);
}

.guest-alert-error {
    background: rgba(185, 28, 28, 0.1);
    color: var(--gp-error);
    border-color: var(--gp-error);
}

.guest-alert-warning {
    background: rgba(180, 83, 9, 0.1);
    color: var(--gp-warning);
    border-color: var(--gp-warning);
}

.guest-alert-info {
    background: rgba(3, 105, 161, 0.1);
    color: var(--gp-info);
    border-color: var(--gp-info);
}

/* ============================================
   MOBILE NAVIGATION - BOTTOM BAR
   ============================================ */
.guest-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gp-surface);
    border-top: 1px solid var(--gp-border);
    box-shadow: 0 -4px 16px rgba(22, 42, 66, 0.08);
    z-index: 1000;
    padding: var(--space-2) 0;
    padding-bottom: calc(var(--space-2) + var(--safe-bottom));
}

.guest-mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.guest-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    color: var(--gp-text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
    min-width: 60px;
    position: relative;
}

.guest-mobile-nav-item:active {
    transform: scale(0.95);
}

.guest-mobile-nav-item.active {
    color: var(--gp-primary);
}

.guest-mobile-nav-icon {
    font-size: 1.25rem;
}

.guest-mobile-nav-label {
    font-size: var(--text-xs);
    font-weight: 500;
}

.guest-mobile-nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--gp-error);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* Hide on tablet+ */
@media (min-width: 768px) {
    .guest-mobile-nav {
        display: none;
    }
}

/* ============================================
   MOBILE LOADING STATES
   ============================================ */
.guest-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    gap: var(--space-4);
}

.guest-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gp-border);
    border-top-color: var(--gp-primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MOBILE UTILITIES
   ============================================ */
.guest-container {
    width: 100%;
    max-width: 100%;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    margin-left: auto;
    margin-right: auto;
}

.guest-divider {
    height: 1px;
    background: var(--gp-border);
    margin: var(--space-4) 0;
}

/* Spacing Utilities */
.guest-spacer-sm { height: var(--space-2); }
.guest-spacer-md { height: var(--space-4); }
.guest-spacer-lg { height: var(--space-6); }
.guest-spacer-xl { height: var(--space-8); }

/* Text Utilities */
.guest-text-center { text-align: center; }
.guest-text-left { text-align: left; }
.guest-text-right { text-align: right; }

.guest-text-primary { color: var(--gp-text); }
.guest-text-secondary { color: var(--gp-text-secondary); }
.guest-text-muted { color: var(--gp-text-muted); }

.guest-text-xs { font-size: var(--text-xs); }
.guest-text-sm { font-size: var(--text-sm); }
.guest-text-base { font-size: var(--text-base); }
.guest-text-lg { font-size: var(--text-lg); }
.guest-text-xl { font-size: var(--text-xl); }

.guest-font-bold { font-weight: 700; }
.guest-font-semibold { font-weight: 600; }
.guest-font-normal { font-weight: 400; }

/* Safe Area Utilities */
.guest-safe-top { padding-top: var(--safe-top); }
.guest-safe-bottom { padding-bottom: var(--safe-bottom); }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */
@media (min-width: 640px) {
    .guest-container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .guest-container {
        max-width: 768px;
    }
    
    .guest-btn,
    .gp-btn {
        width: auto;
    }
}

@media (min-width: 1024px) {
    .guest-container {
        max-width: 1024px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
    outline: 2px solid var(--gp-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .guest-mobile-nav,
    .guest-header-back,
    .guest-btn {
        display: none !important;
    }
}

/* ============================================
   MINI GUEST SURVEY
   ============================================ */
.gp-survey-row,
.gp-survey-page-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--gp-bg, #F8F6F2) 160%);
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: 16px;
    padding: 16px;
    margin: 10px 0 16px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 14px 36px -14px rgba(26, 43, 74, 0.22);
}

.gp-survey-row__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.gp-survey-row__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.gp-survey-row__badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gp-accent-soft, rgba(184, 151, 61, 0.15));
    border: 1px solid rgba(201, 168, 76, 0.35);
    color: var(--gp-accent, #C9A84C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 2px 8px -2px rgba(201, 168, 76, 0.45);
}

.gp-survey-row__title {
    color: var(--gp-primary, #1A2B4A);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.gp-survey-row__context {
    color: var(--gp-text-muted, #6b7280);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gp-survey-row__skip {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--gp-text-muted, #6b7280);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 4px;
    border-radius: 8px;
    transition: color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
    flex-shrink: 0;
}

.gp-survey-row__skip:hover {
    color: var(--gp-primary, #1A2B4A);
}

.gp-survey-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 14px;
    padding: 6px 0;
    direction: ltr;
}

.gp-survey-star {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(26, 43, 74, 0.04);
    color: rgba(107, 114, 128, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: transform var(--gp-duration, 0.25s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)),
                background var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

/* Hover preview: light up stars up to the hovered one */
.gp-survey-stars:hover .gp-survey-star {
    background: var(--gp-accent-soft, rgba(184, 151, 61, 0.15));
    color: var(--gp-accent, #C9A84C);
}

/* Re-dim stars after the hovered index (CSS sibling selector trick) */
.gp-survey-stars:hover .gp-survey-star:hover ~ .gp-survey-star {
    background: rgba(26, 43, 74, 0.04);
    color: rgba(107, 114, 128, 0.35);
}

.gp-survey-star.is-active {
    background: var(--gp-accent-soft, rgba(184, 151, 61, 0.18));
    color: var(--gp-accent, #C9A84C);
}

.gp-survey-star:hover {
    transform: scale(1.12);
}

.gp-survey-star:active {
    transform: scale(0.96);
}

.gp-survey-star:focus-visible {
    outline: 2px solid var(--gp-accent, #C9A84C);
    outline-offset: 2px;
}

.gp-survey-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.gp-survey-chip {
    appearance: none;
    border: 1px solid rgba(26, 43, 74, 0.14);
    border-radius: 999px;
    background: var(--gp-surface, #ffffff);
    color: var(--gp-text-secondary, #475569);
    font-size: 12px;
    font-weight: 700;
    min-height: 32px;
    padding: 6px 14px;
    cursor: pointer;
    transition: border-color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                background var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                transform var(--gp-duration, 0.25s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
}

.gp-survey-chip:hover {
    border-color: rgba(201, 168, 76, 0.5);
    color: var(--gp-accent, #C9A84C);
    transform: translateY(-1px);
}

.gp-survey-chip.is-active {
    border-color: var(--gp-accent, #C9A84C);
    background: var(--gp-accent-soft, rgba(184, 151, 61, 0.15));
    color: var(--gp-primary, #1A2B4A);
}

.gp-survey-comment {
    width: 100%;
    min-height: 68px;
    border: 1px solid rgba(26, 43, 74, 0.14);
    border-radius: 12px;
    padding: 11px 12px;
    resize: vertical;
    color: var(--gp-text, #1a2332);
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    margin-bottom: 12px;
    background: var(--gp-surface, #ffffff);
    transition: border-color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                box-shadow var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.gp-survey-comment::placeholder {
    color: var(--gp-text-muted, #9ca3af);
}

.gp-survey-comment:focus {
    outline: none;
    border-color: var(--gp-accent, #C9A84C);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.gp-survey-actions {
    display: flex;
    justify-content: flex-end;
}

.gp-survey-submit {
    border: 0;
    border-radius: 12px;
    background: var(--gp-primary, #1A2B4A);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(26, 43, 74, 0.55);
    transition: transform var(--gp-duration, 0.25s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)),
                background var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                box-shadow var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.gp-survey-submit:hover:not(:disabled) {
    background: #243e63;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -8px rgba(26, 43, 74, 0.6);
}

.gp-survey-submit:active:not(:disabled) {
    transform: translateY(0);
}

.gp-survey-submit:focus-visible {
    outline: 2px solid var(--gp-accent, #C9A84C);
    outline-offset: 2px;
}

.gp-survey-error {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin: -6px 0 10px;
    padding: 6px 10px;
    background: rgba(220, 38, 38, 0.06);
    border-radius: 8px;
}

.gp-survey-thanks {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 10px 0 16px;
    font-size: 14px;
    font-weight: 800;
    animation: gp-survey-thanks-in var(--gp-duration-slow, 0.4s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) both;
}

.gp-survey-thanks i {
    font-size: 20px;
}

.gp-survey-thanks.is-success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.24);
}

.gp-survey-thanks.is-muted {
    background: rgba(26, 43, 74, 0.05);
    color: var(--gp-text-muted, #6b7280);
    border: 1px solid rgba(26, 43, 74, 0.12);
}

@keyframes gp-survey-thanks-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Full-page survey card — centered, wider, more breathing room */
.gp-survey-page-card {
    max-width: 520px;
    margin-inline: auto;
    padding: 22px;
    margin-top: 20px;
}

.gp-survey-page-card .gp-survey-stars .gp-survey-star {
    width: 52px;
    height: 52px;
    font-size: 24px;
}

@media (max-width: 380px) {
    .gp-survey-page-card {
        padding: 16px;
    }

    .gp-survey-page-card .gp-survey-stars .gp-survey-star {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

.gp-survey-widget {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 1040;
    display: grid;
    grid-template-columns: 44px 1fr auto 30px;
    grid-template-areas: "icon body action close";
    align-items: center;
    gap: 12px;
    background: linear-gradient(180deg, #ffffff 0%, var(--gp-bg, #F8F6F2) 140%);
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 16px;
    padding: 14px 14px 14px 14px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 18px 48px -12px rgba(26, 43, 74, 0.28),
        0 0 0 1px rgba(201, 168, 76, 0.08);
    transition: box-shadow var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
    will-change: transform, opacity;
    animation: gp-survey-widget-in var(--gp-duration-slow, 0.4s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)) both;
}

@keyframes gp-survey-widget-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gp-survey-widget {
        animation: none;
    }
}

.gp-survey-widget:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 22px 56px -10px rgba(26, 43, 74, 0.32),
        0 0 0 1px rgba(201, 168, 76, 0.16);
}

/* Close button - its own grid column, never overlaps content */
.gp-survey-widget__close {
    grid-area: close;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gp-text-muted, #6b7280);
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: background var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                color var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                opacity var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.gp-survey-widget__close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--gp-primary, #1A2B4A);
    opacity: 1;
}

.gp-survey-widget__close:focus-visible {
    outline: 2px solid var(--gp-accent, #C9A84C);
    outline-offset: 2px;
    opacity: 1;
}

/* Icon - solid gold star inside a soft gold disc */
.gp-survey-widget__icon {
    grid-area: icon;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--gp-accent-soft, rgba(184, 151, 61, 0.15));
    border: 1px solid rgba(201, 168, 76, 0.35);
    color: var(--gp-accent, #C9A84C);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px -2px rgba(201, 168, 76, 0.45);
}

.gp-survey-widget__body {
    grid-area: body;
    min-width: 0;
}

.gp-survey-widget__title {
    color: var(--gp-primary, #1A2B4A);
    font-size: 13.5px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.gp-survey-widget__description {
    color: var(--gp-text-muted, #6b7280);
    font-size: 12px;
    line-height: 1.4;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Action - navy primary button, lifted on hover */
.gp-survey-widget__action {
    grid-area: action;
    background: var(--gp-primary, #1A2B4A);
    color: #ffffff;
    border: 1px solid var(--gp-primary, #1A2B4A);
    border-radius: 11px;
    padding: 10px 14px;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--gp-duration, 0.25s) var(--gp-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1)),
                box-shadow var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1)),
                background var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.gp-survey-widget__action i {
    font-size: 10px;
    transition: transform var(--gp-duration, 0.25s) var(--gp-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.gp-survey-widget__action:hover {
    background: #243e63;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -6px rgba(26, 43, 74, 0.5);
}

.gp-survey-widget__action:hover i {
    transform: translateX(2px);
}

.gp-survey-widget__action:active {
    transform: translateY(0);
}

.gp-survey-widget__action:focus-visible {
    outline: 2px solid var(--gp-accent, #C9A84C);
    outline-offset: 2px;
}

@media (min-width: 768px) {
    .gp-survey-widget {
        left: auto;
        width: min(430px, calc(100vw - 28px));
    }
}

@media (max-width: 380px) {
    .gp-survey-widget {
        grid-template-columns: 40px 1fr 30px;
        grid-template-areas:
            "icon body close"
            "action action action";
        gap: 10px;
    }

    .gp-survey-widget__action {
        justify-content: center;
        margin-top: 4px;
    }
}

.gp-survey-trend {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
    padding: 14px 6px 6px;
    min-height: 150px;
}

.gp-survey-trend__col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 34px;
    flex: 1 0 auto;
    height: 140px;
}

.gp-survey-trend__bar {
    width: 100%;
    max-width: 26px;
    min-height: 4px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    transition: height 0.2s ease;
}

.gp-survey-trend__value {
    font-size: 11px;
    font-weight: 800;
    color: #1A2B4A;
}

.gp-survey-trend__label {
    font-size: 10px;
    color: #6b7280;
    white-space: nowrap;
}
