/* CSS Variables (Design Tokens) */
:root {
    /* Colors - Green Theme */
    --primary-green: #166534;
    --secondary-green: #22c55e;
    --accent-green: #86efac;
    --light-green: #dcfce7;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --bg: var(--gray-50);
    --text: var(--gray-900);
    --text-light: var(--gray-600);
    --border-color: var(--gray-300);

    /* Status Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Typography */
    --font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 6px 8px -1px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* Container Styles */
.guest-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: var(--space-lg);
    background-color: var(--bg);
}

@media (min-width: 640px) {
    .guest-container {
        justify-content: center;
        padding-top: 0;
    }
}

/* Logo Styles */
.guest-logo {
    margin-bottom: var(--space-lg);
}

.guest-logo-link {
    display: inline-block;
    text-decoration: none;
}

.guest-logo-image {
    width: 5rem;
    height: 5rem;
    fill: var(--gray-500);
}

/* Card Styles */
.guest-card {
    width: 100%;
    max-width: 28rem;
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

@media (min-width: 640px) {
    .guest-card {
        border-radius: var(--radius-xl);
    }
}

/* Typography Styles */
.guest-form-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: var(--space-lg);
}

.guest-form-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* Form Elements */
.guest-form-group {
    margin-bottom: var(--space-md);
}

.guest-form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.guest-form-label i {
    margin-right: var(--space-sm);
    color: var(--gray-500);
}

.guest-input-wrapper {
    position: relative;
}

.guest-form-input {
    width: 100%;
    padding: 0.625rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--gray-900);
    background-color: white;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.guest-form-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.guest-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

/* Password Toggle */
.guest-password-toggle {
    position: relative;
}

.guest-password-toggle-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-xs);
    transition: color var(--transition-fast);
}

.guest-password-toggle-button:hover {
    color: var(--gray-700);
}

/* Button Styles */
.guest-form-button {
    width: 100%;
    padding: 0.625rem;
    background-color: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.guest-form-button:hover {
    background-color: var(--secondary-green);
    transform: translateY(-2px);
}

.guest-form-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.3);
}

.guest-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Link Styles */
.guest-form-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.guest-form-link:hover {
    color: var(--secondary-green);
    text-decoration: underline;
}

.guest-form-help {
    margin-top: var(--space-md);
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Divider */
.guest-form-divider {
    display: flex;
    align-items: center;
    margin: var(--space-lg) 0;
    color: var(--gray-500);
    font-size: var(--font-size-sm);
}

.guest-form-divider::before,
.guest-form-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.guest-form-divider::before {
    margin-right: 0.75rem;
}

.guest-form-divider::after {
    margin-left: 0.75rem;
}

/* Checkbox */
.guest-form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-md);
}

.guest-form-checkbox input[type="checkbox"] {
    margin-right: var(--space-sm);
    width: 1rem;
    height: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: white;
    cursor: pointer;
    appearance: none;
    position: relative;
    transition: all var(--transition-fast);
}

.guest-form-checkbox input[type="checkbox"]:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.guest-form-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.75rem;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.guest-form-checkbox label {
    font-size: var(--font-size-sm);
    color: var(--gray-700);
    cursor: pointer;
}

/* Status Messages */
.guest-status-message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.guest-status-success {
    background-color: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.guest-status-error {
    background-color: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.guest-status-warning {
    background-color: #fefce8;
    color: var(--warning);
    border: 1px solid #fde68a;
}

.guest-status-info {
    background-color: #eff6ff;
    color: var(--info);
    border: 1px solid #bfdbfe;
}

/* Error States */
.guest-form-error {
    margin-top: var(--space-xs);
    font-size: var(--font-size-sm);
    color: var(--error);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.guest-form-error-input {
    border-color: var(--error) !important;
}

.guest-form-error-input:focus {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.guest-error-list {
    list-style-type: disc;
    padding-left: var(--space-lg);
    font-size: var(--font-size-sm);
    margin-top: var(--space-sm);
}

/* Form Actions */
.guest-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

/* Additional Links */
.guest-additional-links {
    text-align: center;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.guest-additional-links p {
    margin-bottom: var(--space-sm);
}

/* Loading State */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.guest-spinner {
    animation: spin 1s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .guest-card {
        margin: var(--space-md);
        padding: var(--space-md);
    }

    .guest-form-title {
        font-size: var(--font-size-xl);
    }

    .guest-form-actions {
        flex-direction: column;
        gap: var(--space-md);
        align-items: stretch;
    }
}

/* Animation for form elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guest-card {
    animation: fadeIn 0.3s ease-out;
}

/* Focus visible polyfill */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

/* Print styles */
@media print {
    .guest-container {
        background: white;
    }

    .guest-card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* Utility Classes for Auth Pages */

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

/* Color Utilities */
.text-primary {
    color: #2563eb;
}

.text-gray-600 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-900 {
    color: #111827;
}

.text-red-600 {
    color: #dc2626;
}

.text-green-600 {
    color: #059669;
}

.bg-primary-50 {
    background-color: #eff6ff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-white {
    background-color: white;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

/* Spacing Utilities */
.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.ml-4 {
    margin-left: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.flex-1 {
    flex: 1;
}

/* Border Utilities */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border: 1px solid #e5e7eb;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-red-200 {
    border-color: #fecaca;
}

.border-green-200 {
    border-color: #bbf7d0;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Display Utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

/* Width & Height Utilities */
.w-full {
    width: 100%;
}

.w-16 {
    width: 4rem;
}

.h-16 {
    height: 4rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.max-w-md {
    max-width: 28rem;
}

/* Padding Utilities */
.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Transition Utilities */
.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.duration-300 {
    transition-duration: 300ms;
}

/* Hover Effects */
.hover\:text-primary-800:hover {
    color: #1e40af;
}

.hover\:underline:hover {
    text-decoration: underline;
}

/* Focus States */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px currentColor;
}

/* Transform Utilities */
.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.-translate-y-0\.5 {
    --tw-translate-y: -0.125rem;
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

/* Cursor Utilities */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* Opacity Utilities */
.opacity-90 {
    opacity: 0.9;
}

/* List Styles */
.list-disc {
    list-style-type: disc;
}

.list-inside {
    list-style-position: inside;
}


/* Reusable Components */

/* Alert Component */
.auth-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.auth-alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert-warning {
    background-color: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.auth-alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.auth-alert-icon {
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.auth-alert-content {
    flex: 1;
}

.auth-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.auth-alert-message {
    font-size: 0.875rem;
}

/* Button Component */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.auth-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.auth-btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.auth-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.auth-btn-danger {
    background-color: #dc2626;
    color: white;
}

.auth-btn-danger:hover {
    background-color: #b91c1c;
}

.auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.auth-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.auth-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.auth-btn-full {
    width: 100%;
}

.auth-btn-icon {
    margin-right: 0.5rem;
}

.auth-btn-icon-right {
    margin-left: 0.5rem;
}

/* Card Component */
.auth-component-card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.auth-component-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-card-header {
    margin-bottom: 1.5rem;
}

.auth-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.auth-card-description {
    color: #6b7280;
    font-size: 1rem;
}

.auth-card-body {
    margin-bottom: 1.5rem;
}

.auth-card-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
    text-align: center;
}

/* Input Group Component */
.auth-input-group {
    margin-bottom: 1.5rem;
}

.auth-input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.auth-input-with-icon {
    position: relative;
}

.auth-input-left-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.auth-input-right-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.auth-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input.with-left-icon {
    padding-left: 2.5rem;
}

.auth-input.with-right-icon {
    padding-right: 2.5rem;
}

.auth-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-input-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

/* Checkbox Component */
.auth-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.auth-custom-checkbox {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: white;
}

.auth-custom-checkbox.checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.auth-custom-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

/* Divider Component */
.auth-divider {
    position: relative;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.auth-divider-text {
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background-color: white;
    color: #6b7280;
    font-size: 0.875rem;
}