/* Modern Design System */
:root {
    /* Colors */
    --primary: #FF6154;
    --primary-light: #FF7C72;
    --primary-dark: #E54A3E;
    --secondary: #10b981;
    --accent: #8b5cf6;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --error: #ef4444;
    --success: #22c55e;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.main-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    width: 100%;
    height: 900px;
    min-height: min(900px, 100vh);
    position: relative;
    overflow: hidden;
}

/* Typography */
h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}

h2 {
    font-size: 24px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 32px;
}

h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 24px;
}

/* Form Styles */
.bento-form {
    position: relative;
    padding: 32px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    margin-top: 128px;
    height: 100%;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    z-index: 1000;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 250ms ease;
}

/* Card Container and Cards */
.cards-container {
    position: relative;
    min-height: 600px;
    margin-top: 64px;
    perspective: 2000px;
    padding-bottom: 64px;
}

.bento-card {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translate3d(0, 50vh, -100px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    top: 0;
    left: 0;
}

.card-content {
    padding: 32px;
}

/* Card States */
.bento-card.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    z-index: 2;
    pointer-events: all;
}

.bento-card.preview-next {
    opacity: 0.3;
    transform: translate3d(0, 30vh, -50px);
    z-index: 1;
}

.bento-card.preview-prev {
    opacity: 0.3;
    transform: translate3d(0, -30vh, -50px);
    z-index: 1;
}

.bento-card.inactive {
    opacity: 0;
    transform: translate3d(0, 100vh, -200px);
    z-index: 0;
}

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

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 150ms ease;
    background: var(--surface);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(255, 97, 84, 0.1);
}

/* Navigation Buttons */
.form-navigation {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 1000;
    background: var(--surface);
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.nav-btn {
    width: 120px;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.prev-btn {
    background: #e2e8f0;
    color: var(--text);
}

.next-btn {
    background: var(--primary);
    color: white;
    transition: all 150ms ease;
}

.next-btn.submit-btn {
    background: #94a3b8;
    opacity: 0.7;
    cursor: not-allowed;
}

.next-btn.complete {
    background: var(--success);
    opacity: 1;
    cursor: pointer;
}

.prev-btn:hover {
    background: #cbd5e1;
}

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

.next-btn.complete:hover {
    background: #16a34a;
    opacity: 0.9;
}

/* Stripe Elements */
#card-element {
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: var(--surface);
    transition: all 150ms ease;
}

#card-element.StripeElement--focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(255, 97, 84, 0.1);
}

#card-errors {
    color: var(--error);
    font-size: 14px;
    margin-top: 8px;
}

/* No Refund Agreement Styles */
.no-refund-agreement {
    margin: 0px 0px 0px -20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 0;
    cursor: pointer;
}

.legal-link {
    color: var(--primary);
    text-decoration: none;
    transition: color 150ms ease;
}

.legal-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Footer Styles */
.sticky-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f1f5f9;
    color: #475569;
    text-align: center;
    padding: 8px 0;
    z-index: 999;
    font-size: 12px;
    transform: translateY(100%);
    transition: transform 300ms ease;
    border-top: 1px solid #e2e8f0;
}

.sticky-footer.hidden {
    transform: translateY(100%);
}

.sticky-footer:not(.hidden) {
    transform: translateY(0);
}

/* Terms Icon */
.terms-icon {
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 6px 0 0;
    font-size: 12px;
    color: #666;
    text-decoration: none;
    z-index: 1001;
    cursor: pointer;
}

.terms-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* By Bjorn Dunkel Link */
.by-bjorndunkel {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px 0 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    z-index: 1001;
}

.by-bjorndunkel:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Stripe Logo */
.stripe-logo {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 120px;
    height: auto;
    z-index: 1001;
    opacity: 0.8;
    transition: opacity 150ms ease;
}

.stripe-logo:hover {
    opacity: 1;
}

/* Payment Notice */
.payment-notice {
    background: #fff5f4;
    border-left: 2px solid var(--primary);
    padding: 12px;
    margin: 16px 0px 16px 0px;
    border-radius: 8px;
}

.payment-notice p {
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 640px) {
    .main-container {
        padding: 32px 0;
        margin: 0;
    }

    .bento-form {
        padding: 32px 5px;
    }

    .logo-landing {
        width: 300px !important;
        max-width: 300px !important;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 20px;
    }

    .form-navigation {
        padding: 12px;
        bottom: 24px;
    }

    .nav-btn {
        width: 100px;
        padding: 12px;
    }
}

/* Error Message Styles */
.error-message {
    color: var(--error);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* Remove any other error-message styles that might be creating boxes */
#form-error {
    color: var(--error);
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
    max-width: 600px;
    margin: 20px auto;
    display: none;
}

#form-error button {
    float: right;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--error);
    padding: 0;
    margin-left: 10px;
}

/* Success Message Styles */
.success-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.success-icon {
    font-size: 20px;
    font-weight: bold;
}

/* Logo Styles */
.logo {
    display: block;
    margin: 0 auto;
}

.logo-landing {
    width: 400px;
    height: auto;
}

/* Title Container */
.title-container {
    position: absolute;
    width: 100%;
    max-width: 800px;
    text-align: center;
    margin: 64px 0;
    background: transparent;
    padding: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    left: 50%;
    transform: translateX(-50%);
}

.title-container.move-up {
    transform: translate3d(-50%, -30vh, -50px);
    opacity: 0.3;
}

/* Payout Slider Styles */
.payout-slider-container {
    margin-top: 32px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.payout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 24px;
    border-radius: 8px;
}

.payout-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.payout-content {
    padding: 16px 24px;
    transition: all 250ms ease;
}

.payout-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 14px;
    padding: 0 4px;
}

.payout-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payout-percent {
    font-weight: 500;
}

.payout-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primary) 0%, var(--success) 100%);
    border-radius: 4px;
    margin: 16px 0;
    cursor: pointer;
}

.payout-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(255, 97, 84, 0.3);
    transition: all 150ms ease;
}

.payout-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(255, 97, 84, 0.3);
    transition: all 150ms ease;
}

.minimum-fee-notice {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

@keyframes slideOutTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-30px);
        opacity: 0;
    }
}

.slide-in-current {
    animation: slideInBottom 250ms forwards;
}

/* Legal Page Specific Styles */
body.legal-page {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

body.legal-page .main-container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    max-height: none;
}

body.legal-page .legal-content {
    margin-top: 200px;
    padding-bottom: 100px; /* Add space for the footer */
}

.legal-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.legal-nav-link {
    color: var(--primary);
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--primary);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.legal-nav-link:hover {
    background: var(--primary);
    color: white;
}

.legal-section {
    margin-bottom: 60px;
    scroll-margin-top: 20px;
}

.legal-text {
    line-height: 1.6;
    color: var(--text);
}

.legal-text h4 {
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
}

.legal-text p {
    margin-bottom: 15px;
}

.legal-text ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.legal-text li {
    margin-bottom: 8px;
}

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

/* Mobile responsiveness for legal page */
@media (max-width: 640px) {
    body.legal-page .main-container {
        padding: 16px;
    }
    
    .legal-nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .legal-nav-link {
        width: 100%;
        text-align: center;
        max-width: 200px;
    }
    
    .legal-text h4 {
        font-size: 16px;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 20px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cookie-consent-banner.hidden {
    transform: translateY(100%);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h4 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.cookie-consent-text p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.cookie-consent-text p:last-child {
    margin-bottom: 0;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.cookie-btn-decline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.cookie-btn-decline:hover {
    background: var(--text-light);
    color: var(--surface);
}

.cookie-btn-accept {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Responsive design for cookie banner */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-consent-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 16px;
    }
    
    .cookie-consent-text h4 {
        font-size: 16px;
    }
    
    .cookie-consent-text p {
        font-size: 13px;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 80px;
    }
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings-content {
    background: var(--surface);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.cookie-settings-header h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f1f5f9;
    color: var(--text);
}

.cookie-settings-body {
    padding: 0 24px 20px 24px;
}

.cookie-settings-body > p {
    color: var(--text);
    margin-bottom: 24px;
    line-height: 1.6;
}

.cookie-option {
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.cookie-option-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 4px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.cookie-option-text h4 {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.cookie-option-text p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cookie-settings-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.cookie-btn-save {
    background: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.cookie-btn-save:hover {
    background: #059669 !important;
    border-color: #059669 !important;
}

/* Footer separator */
.footer-separator {
    color: var(--text-light);
    margin: 0 8px;
}

/* Responsive design for cookie settings modal */
@media (max-width: 768px) {
    .cookie-settings-modal {
        padding: 10px;
    }
    
    .cookie-settings-content {
        max-height: 95vh;
    }
    
    .cookie-settings-header {
        padding: 20px 20px 0 20px;
    }
    
    .cookie-settings-body {
        padding: 0 20px 16px 20px;
    }
    
    .cookie-settings-footer {
        padding: 16px 20px 20px 20px;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-settings-header h3 {
        font-size: 18px;
    }
    
    .cookie-option {
        padding: 12px;
    }
    
    .cookie-option-header {
        gap: 12px;
    }
    
    .cookie-toggle {
        width: 44px;
        height: 22px;
    }
    
    .toggle-slider:before {
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(22px);
    }
}