/* assets/waitlist.css */

/* Waitlist Form Container */
.evotx-waitlist-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    transition: all 0.3s ease;
}

.evotx-waitlist-container.sold-out {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

/* Sold Out Banner */
.evotx-sold-out-banner {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 15px;
    margin: -20px -20px 15px -20px;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.evotx-sold-out-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Waitlist Header */
.evotx-waitlist-header {
    margin-bottom: 20px;
}

.evotx-waitlist-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
}

.evotx-waitlist-title::before {
    content: '⏰';
    margin-right: 8px;
}

.evotx-waitlist-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Form Fields */
.evotx-waitlist-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .evotx-waitlist-fields {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.evotx-field-group {
    display: flex;
    flex-direction: column;
}

.evotx-field-group.full-width {
    grid-column: 1 / -1;
}

.evotx-waitlist-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evotx-waitlist-input,
.evotx-waitlist-select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.evotx-waitlist-input:focus,
.evotx-waitlist-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.evotx-waitlist-input.error,
.evotx-waitlist-select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Quantity Selector */
.evotx-quantity-group {
    display: flex;
    align-items: center;
    position: relative;
}

.evotx-quantity-btn {
    background: #007bff;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s ease;
    position: absolute;
    z-index: 2;
}

.evotx-quantity-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.evotx-quantity-btn.minus {
    left: 10px;
}

.evotx-quantity-btn.plus {
    right: 10px;
}

.evotx-quantity-input {
    text-align: center;
    padding: 12px 45px !important;
    -moz-appearance: textfield;
}

.evotx-quantity-input::-webkit-outer-spin-button,
.evotx-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Submit Button */
.evotx-waitlist-submit {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.evotx-waitlist-submit:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.evotx-waitlist-submit:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.evotx-waitlist-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.evotx-waitlist-submit:active::before {
    width: 300px;
    height: 300px;
}

/* Messages - Use WordPress/EventON notice styling */
.evotx-waitlist-messages {
    margin: 15px 0;
}

.evotx-waitlist-messages p {
    margin: 0;
    padding: var(--eventon-notice-padding, 12px 15px);
    border-radius: var(--eventon-notice-radius, 4px);
    font-weight: var(--eventon-notice-weight, 500);
    border: 1px solid;
}

.evotx-waitlist-messages.success p {
    background: var(--eventon-success-bg, #d4edda);
    color: var(--eventon-success-text, #155724);
    border-color: var(--eventon-success-border, #c3e6cb);
}

.evotx-waitlist-messages.error p {
    background: var(--eventon-error-bg, #f8d7da);
    color: var(--eventon-error-text, #721c24);
    border-color: var(--eventon-error-border, #f5c6cb);
}

/* Waitlist Stats - Match EventON meta info styling */
.evotx-waitlist-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--eventon-meta-padding, 10px 15px);
    background: var(--eventon-meta-bg, #f8f9fa);
    border-radius: var(--eventon-meta-radius, 4px);
    margin-top: 15px;
    font-size: var(--eventon-meta-font-size, 14px);
    color: var(--eventon-meta-color, #6c757d);
    border: 1px solid var(--eventon-meta-border, #e9ecef);
}

/* Quantity Controls - Simplified to match form styling */
.evotx-quantity-group {
    position: relative;
    display: flex;
    align-items: center;
}

.evotx-quantity-btn {
    background: var(--eventon-btn-secondary-bg, #6c757d);
    color: var(--eventon-btn-secondary-color, #ffffff);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: absolute;
    z-index: 2;
    font-size: 18px;
    line-height: 1;
}

.evotx-quantity-btn:hover {
    background: var(--eventon-btn-secondary-hover, #545b62);
}

.evotx-quantity-btn.minus { left: 8px; }
.evotx-quantity-btn.plus { right: 8px; }

.evotx-quantity-input {
    text-align: center;
    padding-left: 45px !important;
    padding-right: 45px !important;
}

/* Mobile Responsiveness - Inherit theme breakpoints */
@media (max-width: 768px) {
    .evotx-waitlist-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .evotx-waitlist-title {
        font-size: calc(var(--eventon-title-size, 18px) * 0.9);
    }
    
    .evotx-waitlist-input,
    .evotx-waitlist-select {
        font-size: 16px; /* Prevent iOS zoom */
    }
}

/* Remove most custom animations to match EventON's more subtle approach */
.evotx-waitlist-container * {
    transition: all 0.2s ease;
}

/* Ensure compatibility with EventON themes and customizations */
.eventon_events_list .evotx-waitlist-container,
.eventon_event .evotx-waitlist-container,
.eventON .evotx-waitlist-container {
    font-family: inherit;
    color: inherit;
    background: inherit;
}

/* Dark theme support - inherit from EventON/theme */
@media (prefers-color-scheme: dark) {
    .evotx-waitlist-container {
        background: var(--eventon-dark-bg, inherit);
        color: var(--eventon-dark-text, inherit);
        border-color: var(--eventon-dark-border, inherit);
    }
}