/* ============================================
   Design System Variables
   ============================================ */

:root {
    /* Premium Brand Colors - Luxurious Spa Palette */
    --brand-primary: #2d5661;
    /* Soft Champagne Bronze - Sophisticated main brand */
    --brand-dark: #1a3940;
    /* Warm Charcoal - Softer dark tone */
    --brand-light: #e8f1f3;
    /* Warm Ivory - Pristine backgrounds */
    --brand-accent: #4a89a0;
    /* Soft Champagne - Luxury accents */
    --brand-accent-light: #bbd1d7;
    /* Pale Champagne - Accent variations */
    --brand-neutral: #4A453E;
    /* Darker Warm Gray - Enhanced readability for body text */
    --brand-dark-alt: #4A453E;
    /* Alternative warm dark tone */

    /* Text Color System */
    --text-primary: #3A3530;
    /* Dark text for maximum readability */
    --text-secondary: #4A453E;
    /* Secondary text color */
    --text-muted: #999999;
    /* Muted/disabled text */
    --text-light: #CCCCCC;
    /* Light text */
    --text-light-muted: #D4D0CA;
    /* Muted light text for dark backgrounds */
    --text-light-subtle: #B8B0A6;
    /* Very subtle light text */
    --text-inverse: #FFFFFF;
    /* White text on dark backgrounds */

    /* Gray Scale System */
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #EEEEEE;
    --gray-300: #E0E0E0;
    --gray-400: #BDBDBD;
    --gray-500: #9E9E9E;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
}

/* ============================================
   Spa Tour Sticky Ribbon Component
   ============================================ */

/* Sticky Ribbon Container */
.spa-tour-sticky-ribbon {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, #f5b365 0%, #f0a755 100%);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease-out;
    border-top: 2px solid #e89a45;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.ribbon-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ribbon-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Ribbon Sections */
.ribbon-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ribbon-eventbrite {
    flex: 1;
    min-width: 250px;
}

.ribbon-subscribe,
.ribbon-media {
    min-width: 200px;
}

.ribbon-text {
    color: #3d2817;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.ribbon-link {
    color: #2d1a0e;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 2px solid rgba(45, 26, 14, 0.3);
}

.ribbon-link:hover {
    color: #1a0f08;
    border-bottom-color: #2d1a0e;
    transform: translateY(-1px);
}

.ribbon-link .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.ribbon-link:hover .arrow {
    transform: translateX(4px);
}

.ribbon-divider {
    color: rgba(61, 40, 23, 0.3);
    font-size: 1rem;
    margin: 0 0.5rem;
}

.ribbon-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    color: #2d1a0e;
    border: 2px solid #ffffff;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(45, 26, 14, 0);
    position: relative;
    overflow: hidden;
}

.ribbon-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(45, 26, 14, 0.08);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ribbon-button:hover::before {
    width: 300px;
    height: 300px;
}

.ribbon-button:hover {
    background: #2d1a0e;
    color: #ffffff;
    border-color: #2d1a0e;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 26, 14, 0.35), 0 0 0 3px rgba(45, 26, 14, 0.15);
}

.ribbon-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(45, 26, 14, 0.25), 0 0 0 2px rgba(45, 26, 14, 0.1);
}

.ribbon-icon {
    width: 1rem;
    height: 1rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.ribbon-button:hover .ribbon-icon {
    transform: scale(1.1);
}

.ribbon-button > * {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spa-tour-sticky-ribbon {
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .ribbon-container {
        padding: 0 0.75rem;
    }

    .ribbon-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.625rem 0;
    }

    .ribbon-section {
        justify-content: center;
        min-width: 100%;
    }

    .ribbon-eventbrite {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .ribbon-text {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .ribbon-link {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .ribbon-divider {
        display: none;
    }

    .ribbon-button {
        width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
        border-radius: 6px;
        letter-spacing: 0.01em;
        gap: 0.375rem;
    }

    .ribbon-icon {
        width: 0.875rem;
        height: 0.875rem;
    }

    .ribbon-subscribe,
    .ribbon-media {
        min-width: auto;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .ribbon-content {
        gap: 0.375rem;
        padding: 0.5rem 0;
    }

    .ribbon-button {
        padding: 0.4375rem 0.875rem;
        font-size: 0.6875rem;
        gap: 0.3125rem;
    }

    .ribbon-icon {
        width: 0.8125rem;
        height: 0.8125rem;
    }

    .ribbon-text {
        font-size: 0.6875rem;
    }

    .ribbon-link {
        font-size: 0.6875rem;
    }
}

/* ============================================
   Modal Styles
   ============================================ */

.spa-ribbon-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.spa-ribbon-modal[style*="display: flex"] {
    display: flex !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 57, 64, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10001;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    position: relative;
    background: var(--text-inverse);
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
    border: 1px solid var(--gray-200);
    z-index: 10002;
    pointer-events: auto;
    overflow: hidden;
}

.modal-content-large {
    max-width: 540px;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 2px solid var(--brand-light);
    background: linear-gradient(to bottom, var(--gray-50), var(--text-inverse));
    border-radius: 0.75rem 0.75rem 0 0;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
}

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 1.25rem 1.5rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Custom Scrollbar Styling for Modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 0 0 0.75rem 0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Firefox Scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

/* Special Offer Notice */
.special-offer-notice {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-accent-light) 100%);
    border: 2px solid var(--brand-accent);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(45, 86, 97, 0.1);
}

.notice-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--brand-accent);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.notice-content {
    flex: 1;
    color: var(--brand-dark);
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Form Styles */
.ribbon-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.required {
    color: #dc2626;
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--gray-50);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-accent);
    background: var(--text-inverse);
    box-shadow: 0 0 0 3px rgba(74, 137, 160, 0.1);
}

.form-input:hover {
    border-color: var(--brand-accent-light);
}

.form-input.error {
    border-color: #dc2626;
    background: #fef2f2;
}

.form-error {
    display: none;
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-error.visible {
    display: block;
}

/* Checkbox Styles */
.form-group-checkbox {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    gap: 0.75rem;
    cursor: pointer;
    align-items: flex-start;
}

.form-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    margin-top: 0.125rem;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--brand-accent);
}

.checkbox-text {
    font-size: 0.7125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Special Offer Checkbox - Simple Style */

/* Publications Dynamic Input */
.publications-container {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.publication-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.publication-input {
    flex: 1;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 0.375rem;
    color: #dc2626;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: scale(1.05);
}

.btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--brand-light);
    border: 1.5px solid var(--brand-accent-light);
    border-radius: 0.375rem;
    color: var(--brand-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: var(--brand-accent-light);
    border-color: var(--brand-accent);
    transform: translateY(-1px);
}

.btn-icon-sm {
    width: 1.125rem;
    height: 1.125rem;
}

/* File Upload Styles */
.file-upload-container {
    position: relative;
}

.form-input-file {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 1.5rem;
    border: 2px dashed var(--brand-accent-light);
    border-radius: 0.5rem;
    background: var(--brand-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: var(--brand-accent);
    background: var(--text-inverse);
    box-shadow: 0 4px 12px rgba(74, 137, 160, 0.15);
}

.upload-icon {
    width: 2rem;
    height: 2rem;
    color: var(--brand-accent);
    margin-bottom: 0.5rem;
}

.upload-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.upload-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--brand-light);
    border: 1.5px solid var(--brand-accent-light);
    border-radius: 0.375rem;
    margin-top: 0.5rem;
}

.file-icon {
    width: 2rem;
    height: 2rem;
    color: var(--brand-accent);
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-file {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: var(--gray-200);
    color: var(--brand-dark);
}

.btn-remove-file svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* Form Messages */
.form-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.form-message-success {
    background: #d1fae5;
    border: 1.5px solid #6ee7b7;
    color: #065f46;
}

.form-message-error {
    background: #fee2e2;
    border: 1.5px solid #fca5a5;
    color: #991b1b;
}

.message-icon {
    width: 1.375rem;
    height: 1.375rem;
    flex-shrink: 0;
}

.message-text {
    flex: 1;
    line-height: 1.6;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-primary) 100%);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(45, 86, 97, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(45, 86, 97, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: var(--text-inverse);
    color: var(--text-primary);
    border: 1.5px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--brand-light);
    border-color: var(--brand-accent-light);
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.spinner {
    width: 1.125rem;
    height: 1.125rem;
    animation: spin 1s linear infinite;
}

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

.spinner-circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 25;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .spa-ribbon-modal {
        padding: 0;
    }

    .modal-content {
        max-width: 95%;
        width: 95%;
        border-radius: 20px;
        max-height: 90vh;
        height: 90vh;
    }

    .modal-header {
        padding: 1rem 1rem 0.875rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-description {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }

    .special-offer-notice {
        padding: 0.875rem;
        gap: 0.625rem;
        margin-bottom: 1rem;
    }

    .notice-icon {
        width: 1.125rem;
        height: 1.125rem;
    }

    .notice-content {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .ribbon-form {
        gap: 1rem;
    }

    .form-group {
        gap: 0.375rem;
    }

    .form-label {
        font-size: 0.8125rem;
    }

    .form-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .file-upload-label {
        padding: 1.75rem 1rem;
    }

    .upload-icon {
        width: 2rem;
        height: 2rem;
    }

    .upload-text {
        font-size: 0.8125rem;
    }

    .upload-subtext {
        font-size: 0.75rem;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
        margin-top: 0.75rem;
    }

    .btn {
        width: 100%;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .checkbox-text {
        font-size: 0.8125rem;
    }

    .form-checkbox {
        width: 1.125rem;
        height: 1.125rem;
    }

    .publications-container {
        gap: 0.625rem;
    }

    .btn-add {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 768px) {
    .modal-content {
        max-width: 90%;
    }

    .modal-header {
        padding: 1.125rem 1.25rem 0.875rem;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1.125rem 1.25rem 1.25rem;
    }
}

/* Accessibility */
.btn:focus,
.form-input:focus,
.form-checkbox:focus {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* Smooth Scrolling for Modal */
.modal-content {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-accent-light) var(--gray-100);
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.5rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--brand-accent-light);
    border-radius: 3px;
    transition: background 0.2s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--brand-accent);
}

/* Print Styles */
@media print {
    .spa-tour-sticky-ribbon,
    .spa-ribbon-modal {
        display: none !important;
    }
}
