/* WNI Smart Booking - Frontend Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variables */
:root {
    --wni-primary: #6366f1;
    --wni-primary-dark: #4f46e5;
    --wni-primary-light: #818cf8;
    --wni-success: #10b981;
    --wni-error: #ef4444;
    --wni-text: #1f2937;
    --wni-text-light: #6b7280;
    --wni-border: #e5e7eb;
    --wni-bg: #ffffff;
    --wni-bg-light: #f9fafb;
    --wni-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wni-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wni-radius: 12px;
    --wni-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.wni-booking-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.wni-booking-container {
    background: var(--wni-bg);
    border-radius: var(--wni-radius);
    box-shadow: var(--wni-shadow-lg);
    overflow: hidden;
    position: relative;
}

/* Header */
.wni-booking-header {
    background: linear-gradient(135deg, var(--wni-primary) 0%, var(--wni-primary-dark) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.wni-booking-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.wni-booking-subtitle {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
    font-weight: 400;
}

/* Form */
.wni-booking-form {
    padding: 40px 30px;
}

.wni-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wni-form-group {
    margin-bottom: 20px;
}

.wni-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--wni-text);
    font-size: 14px;
}

.wni-label-text {
    margin-right: 4px;
}

.wni-required {
    color: var(--wni-error);
    font-weight: 700;
}

.wni-input,
.wni-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--wni-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--wni-text);
    background: var(--wni-bg);
    transition: var(--wni-transition);
    box-sizing: border-box;
}

.wni-input:focus,
.wni-select:focus {
    outline: none;
    border-color: var(--wni-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.wni-input::placeholder {
    color: var(--wni-text-light);
}

.wni-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Submit Button */
.wni-form-actions {
    margin-top: 30px;
}

.wni-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--wni-primary) 0%, var(--wni-primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wni-transition);
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.wni-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--wni-primary);
}

.wni-submit-btn:active {
    transform: translateY(0);
}

.wni-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.wni-btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Spinner */
.wni-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: wni-spin 0.6s linear infinite;
}

@keyframes wni-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.wni-form-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: wni-slideIn 0.3s ease-out;
}

.wni-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.wni-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@keyframes wni-slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success State */
.wni-booking-success {
    padding: 60px 30px;
    text-align: center;
    animation: wni-fadeIn 0.5s ease-out;
}

@keyframes wni-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wni-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--wni-success) 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
    animation: wni-scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes wni-scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.wni-success-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--wni-text);
}

.wni-success-message {
    margin: 0 0 30px 0;
    color: var(--wni-text-light);
    font-size: 15px;
}

.wni-success-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
}

.wni-whatsapp-btn,
.wni-book-another-btn {
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wni-transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    border: none;
}

.wni-whatsapp-btn {
    background: #25d366;
    color: white;
}

.wni-whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px #25d366;
}

.wni-book-another-btn {
    background: var(--wni-bg-light);
    color: var(--wni-text);
    border: 2px solid var(--wni-border);
}

.wni-book-another-btn:hover {
    background: white;
    border-color: var(--wni-primary);
    color: var(--wni-primary);
}

/* Responsive */
@media (max-width: 640px) {
    .wni-booking-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .wni-booking-header {
        padding: 30px 20px;
    }

    .wni-booking-title {
        font-size: 24px;
    }

    .wni-booking-subtitle {
        font-size: 14px;
    }

    .wni-booking-form {
        padding: 30px 20px;
    }

    .wni-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wni-booking-success {
        padding: 40px 20px;
    }

    .wni-success-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }

    .wni-success-title {
        font-size: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --wni-text: #f9fafb;
        --wni-text-light: #9ca3af;
        --wni-border: #374151;
        --wni-bg: #1f2937;
        --wni-bg-light: #111827;
    }

    .wni-booking-container {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    }

    .wni-input,
    .wni-select {
        background: #111827;
    }

    .wni-book-another-btn {
        background: #374151;
    }

    .wni-book-another-btn:hover {
        background: #4b5563;
    }
}

/* Accessibility */
.wni-input:focus-visible,
.wni-select:focus-visible,
.wni-submit-btn:focus-visible,
.wni-whatsapp-btn:focus-visible,
.wni-book-another-btn:focus-visible {
    outline: 2px solid var(--wni-primary);
    outline-offset: 2px;
}

/* Loading State */
.wni-booking-form.loading .wni-btn-text {
    display: none;
}

.wni-booking-form.loading .wni-btn-loader {
    display: flex;
}