/**
 * Santa Digital Products - Frontend Styles
 * Mobile-first, unified form with avatars and popup
 * 
 * @package SantaAtHome
 */

/* ==========================================================================
   Base Styles - Mobile First
   ========================================================================== */

.santa-digitalprod-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.santa-digitalprod-wrapper input[type="text"],
.santa-digitalprod-wrapper input[type="email"],
.santa-digitalprod-wrapper input[type="tel"],
.santa-digitalprod-wrapper input[type="number"],
.santa-digitalprod-wrapper input[type="date"],
.santa-digitalprod-wrapper input[type="time"],
.santa-digitalprod-wrapper input[type="url"],
.santa-digitalprod-wrapper input[type="search"],
.santa-digitalprod-wrapper input[type="password"] {
    line-height: 1;
}

.santa-digitalprod-wrapper input[type="text"]::placeholder,
.santa-digitalprod-wrapper input[type="email"]::placeholder,
.santa-digitalprod-wrapper input[type="tel"]::placeholder,
.santa-digitalprod-wrapper input[type="number"]::placeholder,
.santa-digitalprod-wrapper input[type="date"]::placeholder,
.santa-digitalprod-wrapper input[type="time"]::placeholder,
.santa-digitalprod-wrapper input[type="url"]::placeholder,
.santa-digitalprod-wrapper input[type="search"]::placeholder,
.santa-digitalprod-wrapper input[type="password"]::placeholder {
    color: #999;
    opacity: 1; /* ensure full visibility */
}


/*
.santa-digitalprod-form {
    overflow: hidden;
}
*/

/* Form Header */
.santa-form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.santa-form-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--santa-primary-color);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

/* Product Notes */
.santa-product-notes {
    border: 3px dashed var(--santa-secondary-color);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin: 0px 0px 25px;
    font-size: 85%;
    line-height: 1.4;
}

/* Children Container */
.santa-children-container {
    margin-bottom: 1.5rem;
}

/* Child Form */
.santa-child-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.santa-child-form:hover {
    border-color: var(--santa-primary-color);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.1);
}

.santa-child-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.santa-child-header h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--santa-primary-color);
    margin: 0;
}

.santa-remove-child {
    background: transparent;
    border: none;
    color: var(--santa-primary-color-hover, #b71c1c);
    font-size: 1.75rem;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.santa-remove-child:hover {
    background: var(--santa-primary-color-hover, #b71c1c);
    color: #fff;
    transform: rotate(90deg);
}

/* Form Grid */
.santa-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.santa-form-group {
    display: flex;
    flex-direction: column;
}

.santa-form-group-full {
    grid-column: 1 / -1;
}

/* Labels */
.santa-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.santa-required {
    color: var(--santa-primary-color-hover, #b71c1c);
}

/* Inputs */
.santa-input,
.santa-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.5;
}

.santa-input:focus,
.santa-textarea:focus {
    outline: none;
    border-color: var(--santa-primary-color);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.santa-input::placeholder,
.santa-textarea::placeholder {
    color: #adb5bd;
}

.santa-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Error States */
.santa-field-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.santa-field-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

.santa-section-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.santa-radio-group.santa-section-error .santa-radio-label {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.santa-checkbox-group.santa-section-error .santa-checkbox-label {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Field Error Messages */
.santa-field-error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

/* Radio Buttons */
.santa-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.santa-radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    justify-content: center;
    margin: 0;
}

.santa-radio-label:hover {
    border-color: var(--santa-primary-color);
    background: #fff5f5;
}

.santa-radio {
    margin-right: 0.5rem;
    accent-color: var(--santa-primary-color);
    cursor: pointer;
}

.santa-radio-label:has(.santa-radio:checked) {
    border-color: var(--santa-primary-color);
    background: var(--santa-primary-color);
    color: #fff;
}

/* Checkbox Group */
.santa-checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.santa-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    justify-content: center;
    margin: 0;
}

.santa-checkbox-label:hover {
    border-color: var(--santa-primary-color);
    background: #fff5f5;
}

.santa-checkbox {
    margin-right: 0.5rem;
    accent-color: var(--santa-primary-color);
    cursor: pointer;
}

.santa-checkbox-label:has(.santa-checkbox:checked) {
    border-color: var(--santa-primary-color);
    background: var(--santa-primary-color);
    color: #fff;
}

/* Avatar Section */
.santa-avatar-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

/* Orientation Selector */
.santa-orientation-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.santa-orientation-option {
    cursor: pointer;
    margin: 0;
}

.santa-orientation-radio {
    display: none;
}

.santa-orientation-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
    font-weight: 600;
    color: #495057;
}
.santa-orientation-label svg {
    width: 40px;
    height: 40px;
    fill: #495057;
}
.santa-orientation-option:hover .santa-orientation-label {
    border-color: var(--santa-primary-color);
    background: #fff5f5;
}

.santa-orientation-radio:checked + .santa-orientation-label {
    border-color: var(--santa-primary-color);
    background: var(--santa-primary-color);
    color: #fff;
}

.santa-orientation-radio:checked + .santa-orientation-label svg {
    fill: #fff;
}

/* Avatar Grid */
.santa-avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.santa-avatar-box {
    cursor: pointer;
    margin: 0;
    position: relative;
}

.santa-avatar-radio {
    display: none;
}

.santa-avatar-content {
    border: 3px solid #dee2e6;
    border-radius: 12px;
    padding: 0.7rem;
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.santa-avatar-box:hover .santa-avatar-content {
    border-color: var(--santa-primary-color);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.15);
}

.santa-avatar-radio:checked + .santa-avatar-content {
    border-color: var(--santa-primary-color);
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.santa-avatar-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    /*
    max-height: 120px;
    object-fit: cover;
    */
}
.santa-example-link {
    position: relative;
}
.santa-avatar-content a,
.santa-example-link svg {
    position: absolute;
    z-index: 10;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: var(--santa-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    border: 2px solid #fff;
}
.santa-avatar-content a svg {
    width: 25px;
    height: 25px;
}
.santa-example-link svg {
    width: 50px;
    height: 50px;
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -20px;
    padding: 10px;
}

.santa-avatar-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.santa-avatar-radio:checked + .santa-avatar-content .santa-avatar-name {
    color: var(--santa-primary-color);
}

/* ESEMPI */
.wrap-santa-example {
    margin: 60px 0;
}
h3.santa-example-section-title {
    font-size: 20px;
    line-height: 1;
    margin: 0 0 20px;
    text-align: center;
    font-family: Montserrat;
}
.santa-example-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.santa-example-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
}
.santa-example-item .sdla-player{
    padding: 20px;
}
.santa-example-item .santa-example-label{
    background-color: var(--santa-primary-color);
    color: #fff;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    text-align: center;
    font-size: 15px;
}

/* Buttons */
.santa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    font-family: inherit;
}

.santa-btn-primary {
    background: var(--santa-primary-color);
    color: #fff;
    width: 100%;
}

.santa-btn-primary:hover:not(:disabled) {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.santa-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.santa-btn-secondary {
    background: #fff;
    color: var(--santa-primary-color);
    border: 2px solid var(--santa-primary-color);
}

.santa-btn-secondary:hover {
    background: var(--santa-primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.santa-icon {
    line-height: 1;
}

/* Form Actions */
.santa-form-actions {
    margin-bottom: 2rem;
    text-align: center;
}

/* Form Footer */
.santa-form-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    border: 1px solid #ddd;
}

.santa-price-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
}

.santa-price-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #495057;
}

.santa-price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--santa-primary-color);
}

/* Loader */
.santa-loader {
    display: inline-flex;
    align-items: center;
}

.santa-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: santa-spin 0.6s linear infinite;
}
#santa-order-later-box .santa-spinner {
    width: 24px;
    height: 24px;
    margin: 0;
}

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

/* Messages */
.santa-form-messages {
    margin: 1.5rem 0;
}

.santa-message {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.santa-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.santa-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ==========================================================================
   Purchase Mode Toggle - Configura subito / Compila dopo
   ========================================================================== */

.santa-purchase-mode-toggle-info {
    text-align: center;
    background-color: #fff3cc;
    color: #333;
    padding: 15px;
    border: 1px solid #ffe48b;
    border-radius: 5px;
    margin-bottom: 30px;
}
.santa-purchase-mode-toggle-info h4 {
    font-size: 1.2rem;
    font-family: Montserrat;
    font-weight: 700;
    color: var(--santa-primary-color);
    margin: 0 0 1rem 0;
}
.santa-purchase-mode-toggle-info p {
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    margin: 0;
}

.santa-purchase-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #dee2e6;
}

.santa-toggle-option {
    cursor: pointer;
    margin: 0;
}

.santa-mode-radio {
    display: none;
}

.santa-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.4;
}

.santa-toggle-label svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.santa-toggle-option:hover .santa-toggle-label {
    border-color: var(--santa-secondary-color);
    background: rgba(142, 227, 135, 0.2);
    color: var(--santa-secondary-color);
}

.santa-toggle-option.santa-toggle-active .santa-toggle-label,
.santa-mode-radio:checked + .santa-toggle-label {
    border-color: var(--santa-secondary-color);
    background: var(--santa-secondary-color);
    color: #fff;
    transform: translateY(-2px);
}

.santa-toggle-option.santa-toggle-active .santa-toggle-label svg,
.santa-mode-radio:checked + .santa-toggle-label svg {
    fill: #fff;
}

.santa-promo-notice {
    /*
    background: rgba(142, 227, 135, 0.2);
    color: var(--santa-secondary-color);
    padding: 1rem;
    border-radius: 8px;
    */
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    margin-top: 30px;
}

/* Order Later Box */
.santa-order-later-box {
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border: 3px dashed var(--santa-primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.santa-order-later-content h3 {
    color: var(--santa-primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.santa-order-later-content p {
    color: #6c757d;
    margin: 0 0 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.santa-order-later-quantity {
    max-width: 300px;
    margin: 0 auto 2rem auto;
}

.santa-quantity-wrapper {
    margin-top: 0.5rem;
}

.santa-quantity-input {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1rem;
}

.santa-order-later-actions {
    max-width: 400px;
    margin: 0 auto;
}

.santa-add-to-cart-later {
    font-size: 1.125rem;
    padding: 1rem 2rem;
}

.santa-add-to-cart-later svg {
    width: 20px;
    height: 20px;
}

/* Stili per lo scroll orizzontale su mobile */
@media (max-width: 767px) {
    .santa-example-section {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling su iOS */
        gap: 15px;
        padding: 10px 0;
        /* Nascondi scrollbar ma mantieni funzionalità */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .santa-example-section::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .santa-example-item {
        flex: 0 0 85%; /* Ogni item occupa 85% della larghezza */
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
    
    /* Opzionale: aggiungi padding laterale per il primo e ultimo elemento */
    .santa-example-item:first-child {
        margin-left: 7.5%;
    }
    
    .santa-example-item:last-child {
        margin-right: 7.5%;
    }
}

/* Mobile Responsive for Toggle */
@media (max-width: 640px) {
    .santa-purchase-mode-toggle {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .santa-toggle-label {
        padding: 1rem 0.75rem;
        font-size: 0.8rem;
    }

    .santa-order-later-box {
        padding: 1.5rem 1rem;
    }

    .santa-order-later-content h3 {
        font-size: 1.25rem;
    }

    .santa-order-later-content p {
        font-size: 0.9rem;
    }
}

/* Popup Modal */
.santa-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.santa-popup-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: santa-popup-enter 0.3s ease;
}

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

.santa-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}

.santa-popup-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--santa-primary-color);
}

.santa-popup-close {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.santa-popup-close:hover {
    background: #f8f9fa;
    color: var(--santa-primary-color);
}

.santa-popup-content {
    padding: 2rem 1.5rem;
}

.santa-popup-content p {
    margin: 0 0 1.5rem 0;
    color: #6c757d;
    line-height: 1.6;
}

.santa-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.santa-popup-actions .santa-btn {
    width: 100%;
}

body.santa-popup-open {
    overflow: hidden;
}

/* ==========================================================================
   Tablet Styles (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {
    .santa-digitalprod-wrapper {
        padding: 2rem;
    }

    .santa-form-header h3 {
        font-size: 2rem;
    }

    .santa-form-header {
        margin-bottom: 2.5rem;
    }

    .santa-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .santa-child-form {
        padding: 2rem;
    }

    .santa-btn {
        width: auto;
        min-width: 200px;
    }

    .santa-form-actions {
        text-align: left;
    }

    .santa-form-footer {
        padding: 2rem;
    }

    .santa-popup-actions {
        flex-direction: row;
    }
}

/* ==========================================================================
   Desktop Styles (min-width: 1024px)
   ========================================================================== */

@media (min-width: 1024px) {
    .santa-digitalprod-wrapper {
        max-width: 900px;
        padding: 2.5rem;
    }
    .woocommerce-MyAccount-content .santa-digitalprod-wrapper {
        padding: 0;
        max-width: 100%;
        margin: 30px 0 0;
    }

    .santa-form-header h3 {
        font-size: 2.25rem;
    }

    .santa-child-form {
        padding: 2.5rem;
    }

    .santa-form-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 2rem 2.5rem;
    }

    .santa-price-summary {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }
}

/* ==========================================================================
   Small Desktop Styles (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    .santa-orientation-label {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.santa-btn:focus,
.santa-input:focus,
.santa-textarea:focus,
.santa-radio:focus {
    outline: 3px solid rgba(211, 47, 47, 0.3);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .santa-remove-child,
    .santa-add-child,
    .santa-form-footer,
    .santa-popup-overlay {
        display: none;
    }
}

/* ==========================================================================
   SANTA MAPS STYLES
   ========================================================================== */

#santa-maps-section {
    margin-bottom: 40px;
}

.santa-step {
    background: #FFF;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    text-align: center;
}

.santa-step:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.santa-step h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--santa-primary-color);
    font-size: 1.3em;
    font-weight: 600;
}

/* Datepicker & Address Input */
.santa-datepicker {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: white;
}

.santa-datepicker:focus {
    border-color: var(--santa-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* Address Input Wrapper */
.santa-address-input-wrapper {
    position: relative;
    max-width: 100%;
}

.santa-address-input {
    width: 100%;
    padding: 14px 50px 14px 18px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
}

.santa-address-input:focus {
    border-color: var(--santa-primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.santa-address-input.santa-address-valid {
    border-color: #28a745;
    background: #f0fff4;
}

.santa-address-icon,
.santa-address-check {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    pointer-events: none;
}

.santa-address-icon svg {
    color: var(--santa-primary-color);
    width: 20px;
    height: 20px;
}

.santa-address-check svg {
    width: 20px;
    height: 20px;
    color: var(--santa-secondary-color);
}

.santa-field-note {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Loader */
#santa-slots-loader {
    text-align: center;
    padding: 30px;
}

.santa-loader-spinner {
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--santa-primary-color);
    border-radius: 50%;
    animation: santa-spin 1s linear infinite;
}

/* Error Message */
.santa-error-message {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.6;
    border: 4px dashed var(--santa-primary-color);
}

.santa-error-message p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    text-align: center;
    align-items: center;
}

/* Slots Grid */
.santa-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.santa-slot-option {
    position: relative;
}

.santa-slot-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.santa-slot-option label {
    display: block;
    padding: 18px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.santa-slot-option label:hover {
    border-color: var(--santa-primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.2);
}

.santa-slot-option label .slot-date {
    font-size: 0.8em;
    font-weight: 600;
    line-height: 1;
}

.santa-slot-option input:checked + label {
    background: var(--santa-primary-color);
    color: white;
    border-color: var(--santa-primary-color);
    font-weight: 600;
}

.santa-slot-option label strong {
    display: block;
    font-size: 1.5em;
    margin-top: 5px;
    line-height: 1;
    font-weight: 600;
}

.slot-distance {
    display: block;
    font-size: 13px;
    margin-top: 5px;
    opacity: 0.85;
}

.santa-slot-option input:checked + label .slot-distance {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .santa-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .santa-step {
        padding: 20px 15px;
    }
    
    .santa-datepicker,
    .santa-address-input {
        font-size: 14px;
    }
}

/* jQuery UI Datepicker Override */
.ui-datepicker {
    z-index: 9999 !important;
}

/* Datepicker moderno e minimal */
.ui-datepicker {
    border: none;
    box-shadow: 0 4px 32px 0 rgba(32,44,80,0.10);
    border-radius: 18px;
    font-family: inherit;
    padding: 18px 20px 14px 20px;
    background: #fff;
    min-width: 285px;
    width: auto;
}

.ui-datepicker-header {
    background: none;
    border: none;
    padding-bottom: 8px;
    margin-bottom: 10px;
    text-align: center;
}

.ui-datepicker-title {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--santa-primary-color);
    letter-spacing: 0.01em;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    cursor: pointer;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 50%;
    color: var(--santa-secondary-color-hover);
    font-size: 1.25em;
    transition: background 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: var(--santa-secondary-color);
    color: #fff;
}

.ui-datepicker-calendar {
    border-collapse: separate;
    border-spacing: 6px;
    width: 100%;
}

.ui-datepicker th {
    color: var(--santa-secondary-color-hover);
    font-size: 0.9em;
    font-weight: 500;
    background: none;
    border: none;
    padding-bottom: 0.2em;
}

.ui-datepicker td {
    padding: 0;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: block;
    padding: 8px 0;
    width: 38px;
    border-radius: 5px;
    margin: 0 auto;
    font-size: 1em;
    text-align: center;
    color: #30364e;
    text-decoration: none;
    border: none;
    background: none;
    transition: background .16s, color .16s, border-color .16s;
}

/* Date disponibili evidenziate */
.ui-datepicker td.santa-date-available a {
    background: #d4edda !important;
    color: var(--santa-secondary-color-hover) !important;
    font-weight: 600;
    border: 2px solid var(--santa-secondary-color);
    transition: background .15s, color .15s, border-color .15s;
}

.ui-datepicker td.santa-date-available a:hover {
    background: var(--santa-secondary-color) !important;
    color: #fff !important;
    border-color: var(--santa-secondary-color);
}

.ui-datepicker td.santa-date-available.ui-datepicker-current-day a {
    background: var(--santa-primary-color) !important;
    color: #fff !important;
    border-color: var(--santa-primary-color);
}

/* Giorno oggi non disponibile */
.ui-datepicker td.ui-datepicker-today a {
    border: 2px solid var(--santa-primary-color);
}

/* Date non disponibili */
.ui-datepicker td.ui-state-disabled span,
.ui-datepicker td.ui-state-disabled {
    opacity: 0.45;
    color: #bababa;
    background: none;
    pointer-events: none;
}

.ui-datepicker td a:hover:not(.ui-state-disabled) {
    background: #e8f7fe;
    color: var(--santa-primary-color);
}

.ui-datepicker td.ui-datepicker-other-month {
    opacity: 0.09;
}

/* Remove Jquery UI default triangle indicators */
.ui-datepicker .ui-icon {
    display: none;
}
