/**
 * Reservation Form Styles
 * Saint-Martin Website
 */

/* ============================================
   TIMER STICKY - OPTIMIZED FOR MOBILE
   ============================================ */

.timer-sticky {
    position: fixed;
    top: 70px;
    right: 1rem;
    background: linear-gradient(135deg, #F39C12 0%, #E67E22 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
    animation: slideIn 0.5s ease;
    min-width: 140px;
}

@keyframes slideIn {
    from {
        transform: translateX(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.timer-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.timer-icon {
    font-size: 1.2rem;
}

.timer-display {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.timer-label {
    display: none; /* Hidden on mobile */
}

.timer-message {
    display: none; /* Hidden on mobile */
}

.timer-sticky.warning {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    animation: pulse 1s infinite;
}

.timer-sticky.danger {
    background: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Desktop: Show full timer */
@media (min-width: 768px) {
    .timer-sticky {
        top: 90px;
        right: 2rem;
        padding: 0.75rem 1.5rem;
        border-radius: 30px;
        min-width: 200px;
    }
    
    .timer-content {
        font-size: 0.9rem;
    }
    
    .timer-label {
        display: block;
        font-size: 0.75rem;
        opacity: 0.9;
    }
    
    .timer-display {
        font-size: 1.4rem;
    }
}

/* ============================================
   RESERVATION CONTAINER - MODERN DESIGN
   ============================================ */

.reservation-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
}

.form-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.form-header h1 {
    margin: 0;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.form-subtitle {
    margin: 0.5rem 0 0;
    opacity: 0.95;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* ============================================
   PROGRESS STEPS
   ============================================ */

.progress-steps {
    display: flex;
    justify-content: space-between;
    padding: 2rem 1rem 1rem;
    background: #f8f9fa;
    position: relative;
    overflow-x: auto;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 3rem;
    left: 5%;
    right: 5%;
    height: 2px;
    background: #ddd;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 80px;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #5DADE2;
    color: white;
    transform: scale(1.2);
}

.step.completed .step-number {
    background: #27AE60;
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
}

.step.active .step-label {
    color: #5DADE2;
    font-weight: 600;
}

/* ============================================
   FORM STEPS
   ============================================ */

.form-step {
    padding: 2rem;
}

.form-step h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.step-description {
    color: #666;
    margin-bottom: 2rem;
}

/* ============================================
   PEOPLE SELECTOR - MODERN CARDS
   ============================================ */

.people-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.people-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.people-row:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f2ff 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(102,126,234,0.15);
    transform: translateY(-2px);
}

.people-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.people-info strong {
    font-size: 1.05rem;
    color: #2d3748;
}

.price-info {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

.people-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-counter {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(102,126,234,0.3);
}

.btn-counter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102,126,234,0.4);
}

.btn-counter:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102,126,234,0.3);
}

.people-controls input[type="number"] {
    width: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: none;
    background: transparent;
    color: #333;
}

.total-people {
    text-align: center;
    font-size: 1.2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* ============================================
   DAYS & SLOTS GRID
   ============================================ */

.days-grid,
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.day-card,
.slot-card {
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.day-card:hover:not(.full),
.slot-card:hover:not(.full) {
    border-color: #5DADE2;
    background: #E8F6FB;
    transform: translateY(-2px);
}

.day-card.selected,
.slot-card.selected {
    border-color: #5DADE2;
    background: #5DADE2;
    color: white;
}

.day-card.full,
.slot-card.full {
    background: #f0f0f0;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.day-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.day-date {
    color: #666;
    font-size: 0.9rem;
}

.day-card.selected .day-date {
    color: rgba(255,255,255,0.9);
}

.places-info {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #27AE60;
    font-weight: 600;
}

.places-info.warning {
    color: #F39C12;
}

.places-info.danger {
    color: #E74C3C;
}

.slot-time {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.selected-day-info {
    padding: 1rem;
    background: #E8F6FB;
    border-left: 4px solid #5DADE2;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* ============================================
   OPTIONS
   ============================================ */

.night-option,
.payment-option {
    margin-bottom: 2rem;
}

.option-card {
    padding: 1.5rem;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-card:hover {
    border-color: #5DADE2;
}

.option-card.selected {
    border-color: #5DADE2;
    background: #E8F6FB;
}

.option-card h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.price-highlight {
    color: #5DADE2;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.night-controls {
    margin-top: 1rem;
}

.night-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.night-controls input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#nightAvailability {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
}

#nightAvailability.available {
    background: #D5F4E6;
    color: #27AE60;
}

#nightAvailability.unavailable {
    background: #FADBD8;
    color: #E74C3C;
}

/* ============================================
   SUMMARY & PROMO
   ============================================ */

.summary-box {
    background: #f8f9fa;
    border: 2px solid #5DADE2;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-box h3 {
    color: #5DADE2;
    margin-bottom: 1rem;
}

#summaryContent {
    margin-bottom: 1.5rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #ddd;
}

.summary-line:last-child {
    border-bottom: none;
}

.promo-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #ddd;
}

.promo-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.promo-input-group input {
    flex: 1;
}

#promoMessage {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

#promoMessage.success {
    background: #D5F4E6;
    color: #27AE60;
}

#promoMessage.error {
    background: #FADBD8;
    color: #E74C3C;
}

.total-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #5DADE2;
    font-size: 1.2rem;
    font-weight: bold;
}

.subtotal-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 1rem;
}

.discount-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #27AE60;
    font-size: 1rem;
}

.total-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    color: #5DADE2;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

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

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5DADE2;
}

.form-group input:required:invalid,
.form-group select:required:invalid {
    border-color: #ddd;
}

/* ============================================
   FORM ACTIONS
   ============================================ */

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* ============================================
   PAYMENT METHOD
   ============================================ */

.option-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.option-header input[type="radio"] {
    width: 20px;
    height: 20px;
}

.option-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .timer-sticky {
        top: 60px;
        right: 0.5rem;
        padding: 0.4rem 0.75rem;
        border-radius: 15px;
        min-width: 110px;
        font-size: 0.8rem;
    }
    
    .timer-icon {
        font-size: 1rem;
    }
    
    .timer-display {
        font-size: 1rem;
    }
    
    .progress-steps {
        padding: 1rem 0.5rem 0.5rem;
    }
    
    .step {
        min-width: 60px;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .form-step {
        padding: 1.5rem 1rem;
    }
    
    .form-header {
        padding: 2rem 1.5rem;
    }
    
    .form-header h1 {
        font-size: 1.5rem;
    }
    
    .people-row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .btn-counter {
        width: 40px;
        height: 40px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .days-grid,
    .slots-grid {
        grid-template-columns: 1fr;
    }
}
