/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2d4a6f;
    --accent: #1e3a5f;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border: #e2e8f0;
    --border-focus: #1e3a5f;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.steps-nav {
    display: flex;
    gap: 8px;
}

.step-tab {
    background: none;
    border: none;
    padding: 20px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.step-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.2s;
}

.step-tab.active {
    color: var(--primary);
}

.step-tab.active::after {
    background: var(--primary);
}

.step-tab.completed {
    color: var(--primary);
}

.step-check {
    width: 18px;
    height: 18px;
    display: none;
}

.step-tab.completed .step-check {
    display: block;
    color: var(--success);
}

.lang-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: 6px;
}

.lang-btn {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--primary);
    color: white;
}

.lang-btn:hover:not(.active) {
    background: var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 32px 24px;
    gap: 32px;
}

.form-container {
    flex: 1;
    max-width: 700px;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Step Card */
.step-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.step-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    text-align: center;
}

.step-subtitle {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 32px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.select-wrapper {
    position: relative;
}

.form-select,
.form-input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-family: var(--font);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-select:invalid,
.form-input:invalid:not(:placeholder-shown) {
    border-color: var(--border);
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
}

.form-hint {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

/* Address Row */
.address-row,
.contact-row,
.card-row {
    display: flex;
    gap: 16px;
}

.address-row .form-group,
.contact-row .form-group,
.card-row .form-group {
    flex: 1;
}

.flex-grow {
    flex: 2 !important;
}

.postcode-input {
    max-width: 120px;
}

/* Frequency Options */
.frequency-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-card {
    position: relative;
    display: block;
    cursor: pointer;
}

.radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.02);
}

.radio-card:hover .radio-card-content {
    border-color: var(--primary-light);
}

.radio-card-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
}

.radio-card-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.radio-card-price span {
    font-weight: 400;
    color: var(--text-light);
}

.popular-badge {
    position: absolute;
    top: -1px;
    right: 16px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 0 0 6px 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Info Box */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    background: #e8f4f8;
    border-radius: var(--radius);
    margin-top: 24px;
}

.info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.info-box p {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
}

/* Addons */
.addons-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.addon-card {
    display: block;
    cursor: pointer;
}

.addon-card input {
    position: absolute;
    opacity: 0;
}

.addon-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.addon-card input:checked + .addon-content {
    border-color: var(--primary);
    background: rgba(30, 58, 95, 0.02);
}

.addon-card:hover .addon-content {
    border-color: var(--primary-light);
}

.addon-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius);
}

.addon-info {
    display: flex;
    flex-direction: column;
}

.addon-title {
    font-weight: 500;
    color: var(--text);
}

.addon-time {
    font-size: 13px;
    color: var(--text-light);
}

/* One-time notice */
.onetime-notice {
    margin-top: 16px;
    padding: 16px;
    background: #fff7ed;
    border-radius: var(--radius);
    border-left: 3px solid var(--warning);
}

.onetime-notice p {
    font-size: 14px;
    color: var(--text);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 12px;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 2px;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.checkbox-group {
    margin-top: 24px;
}

.checkbox-label a {
    color: var(--primary);
}

/* Calendar */
.calendar-container {
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    background: var(--border);
}

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

.calendar-day {
    margin-bottom: 24px;
}

.calendar-day-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.calendar-day-header.no-times {
    color: var(--text-lighter);
    border-bottom-color: var(--border);
}

.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.time-slot {
    padding: 10px 16px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
}

.time-slot:hover {
    border-color: var(--primary-light);
}

.time-slot.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.no-times-text {
    color: var(--text-lighter);
    font-size: 14px;
}

/* No time box */
.no-time-box {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.no-time-title {
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 4px;
}

.no-time-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

/* Coupon */
.coupon-link {
    display: inline-block;
    color: var(--primary);
    font-size: 14px;
    text-decoration: underline;
    margin-bottom: 16px;
}

.coupon-input-wrapper {
    margin-bottom: 16px;
}

.coupon-input-wrapper .form-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.coupon-input-wrapper .form-input {
    flex: 1;
}

.coupon-apply {
    flex-shrink: 0;
}

.coupon-message {
    font-size: 13px;
}

.coupon-message.success {
    color: var(--success);
}

.coupon-message.error {
    color: var(--error);
}

/* Payment */
.payment-methods {
    margin-bottom: 24px;
}

.gpay-button-container {
    margin-bottom: 16px;
}

.payment-option {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.payment-option.active {
    border-color: var(--primary);
}

.payment-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.radio-label input {
    position: absolute;
    opacity: 0;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.radio-label input:checked + .radio-custom {
    border-color: var(--primary);
}

.radio-label input:checked + .radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.payment-title {
    font-weight: 600;
    color: var(--text);
}

.card-icons {
    display: flex;
    gap: 8px;
}

.card-icon {
    height: 24px;
    width: auto;
}

.payment-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-form {
    margin-bottom: 16px;
}

.stripe-input {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.stripe-input.StripeElement--focus {
    border-color: var(--border-focus);
}

.stripe-input.StripeElement--invalid {
    border-color: var(--error);
}

.charge-notice {
    font-size: 14px;
    color: var(--text-light);
}

.charge-notice strong {
    color: var(--text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--text-light);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-pay {
    width: 100%;
    margin-bottom: 16px;
}

.step-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.step-actions.two-buttons {
    justify-content: space-between;
}

.secure-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-lighter);
    font-size: 13px;
}

.lock-icon {
    width: 16px;
    height: 16px;
}

/* Sidebar */
.sidebar {
    width: 340px;
    flex-shrink: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 96px;
}

.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.summary-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.summary-content {
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text);
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-icon {
    margin-right: 8px;
}

.summary-customer {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.summary-time {
    color: var(--text-light);
    margin-left: 8px;
}

.check-icon {
    width: 16px;
    height: 16px;
    color: var(--success);
    margin-right: 4px;
    vertical-align: middle;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* Pricing */
.summary-pricing {
    background: #fffbeb;
    margin: -20px;
    margin-top: 16px;
    padding: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.price-row:last-child {
    margin-bottom: 0;
}

.discount-row {
    color: var(--success);
}

.total-row {
    font-weight: 700;
    font-size: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.tax-row {
    color: var(--text-light);
    font-size: 13px;
}

.tax-row a {
    color: var(--primary);
}

/* What's included */
.included-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.included-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.included-item {
    border-bottom: 1px solid var(--border);
}

.included-item:last-child {
    border-bottom: none;
}

.included-item summary {
    padding: 12px 0;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.included-item summary::after {
    content: '▼';
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.2s;
}

.included-item[open] summary::after {
    transform: rotate(180deg);
}

.included-item ul {
    padding: 0 0 16px 0;
    list-style: none;
}

.included-item li {
    font-size: 13px;
    color: var(--text-light);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.included-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 11px;
}

/* Success Card */
.success-card {
    text-align: center;
    padding: 48px 32px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.success-details {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    margin: 32px 0;
    text-align: left;
}

.success-details p {
    margin-bottom: 8px;
    font-size: 14px;
}

.success-details strong {
    color: var(--text);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .sidebar-sticky {
        position: static;
    }
    
    .summary-card {
        margin-bottom: 24px;
    }
    
    .included-section {
        display: none;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        flex-wrap: wrap;
        height: auto;
        padding-top: 12px;
        padding-bottom: 0;
    }
    
    .logo {
        order: 1;
    }
    
    .lang-toggle {
        order: 2;
    }
    
    .steps-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .step-tab {
        padding: 16px 12px;
        font-size: 13px;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .step-card {
        padding: 24px 20px;
    }
    
    .step-title {
        font-size: 22px;
    }
    
    .address-row,
    .contact-row {
        flex-direction: column;
    }
    
    .postcode-input {
        max-width: 100%;
    }
    
    .card-row {
        flex-direction: row;
    }
    
    .addons-grid {
        grid-template-columns: 1fr;
    }
    
    .step-actions.two-buttons {
        flex-direction: column-reverse;
    }
    
    .step-actions .btn {
        width: 100%;
    }
}

/* Error states */
.form-input.error,
.form-select.error {
    border-color: var(--error);
}

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 4px;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--text);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.error {
    background: var(--error);
}

.toast.success {
    background: var(--success);
}

@keyframes slideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
