/**
 * Stili form prenotazione YummyIt - Multi-step Design Moderno
 */

.yummyit-reservation-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.yummyit-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.yummyit-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4af37 0%, #f4e4bc 50%, #d4af37 100%);
}

/* Steps Indicator */
.yummyit-steps-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
    padding: 0 20px;
}

.yummyit-steps-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.yummyit-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.yummyit-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px;
    transition: all 0.3s ease;
    border: 3px solid #e0e0e0;
}

.yummyit-step.active .yummyit-step-number {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
    transform: scale(1.1);
}

.yummyit-step.completed .yummyit-step-number {
    background: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

.yummyit-step-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.yummyit-step.active .yummyit-step-label {
    color: #d4af37;
    font-weight: 600;
}

.yummyit-step.completed .yummyit-step-label {
    color: #4caf50;
}

/* Form Steps */
.yummyit-form-step {
    min-height: 400px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yummyit-step-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.yummyit-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.yummyit-form-group {
    margin-bottom: 24px;
    position: relative;
}

.yummyit-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.yummyit-form-group .required {
    color: #e74c3c;
}

.yummyit-form-group input[type="text"],
.yummyit-form-group input[type="email"],
.yummyit-form-group input[type="tel"],
.yummyit-form-group input[type="number"],
.yummyit-form-group input[type="date"],
.yummyit-form-group select,
.yummyit-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.yummyit-form-group input:focus,
.yummyit-form-group select:focus,
.yummyit-form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.yummyit-form-group input.error,
.yummyit-form-group select.error,
.yummyit-form-group textarea.error {
    border-color: #e74c3c;
}

.yummyit-form-group .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.yummyit-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.yummyit-form-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* Buttons */
.yummyit-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.yummyit-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yummyit-btn-next,
.yummyit-btn-submit {
    background: linear-gradient(135deg, #d4af37 0%, #c19b26 100%);
    color: #fff;
    margin-left: auto;
}

.yummyit-btn-next:hover,
.yummyit-btn-submit:hover {
    background: linear-gradient(135deg, #c19b26 0%, #a8891f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.yummyit-btn-prev {
    background: #f5f5f5;
    color: #666;
}

.yummyit-btn-prev:hover {
    background: #e8e8e8;
    color: #333;
}

.yummyit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Quantity Selector */
.yummyit-quantity-selector {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

.yummyit-quantity-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    background: #fff;
    color: #d4af37;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

.yummyit-quantity-btn:hover:not(:disabled) {
    background: #d4af37;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.yummyit-quantity-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.yummyit-quantity-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

.yummyit-quantity-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.yummyit-quantity-display span:first-child {
    font-size: 64px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 8px;
}

.yummyit-quantity-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .yummyit-quantity-selector {
        gap: 20px;
        padding: 30px 20px;
    }
    
    .yummyit-quantity-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .yummyit-quantity-display span:first-child {
        font-size: 48px;
    }
    
    .yummyit-quantity-display {
        min-width: 100px;
    }
}

/* Summary Styles */
.yummyit-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.yummyit-summary-section {
    margin-bottom: 30px;
}

.yummyit-summary-section:last-child {
    margin-bottom: 0;
}

.yummyit-summary-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.yummyit-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.yummyit-summary-item strong {
    color: #2c3e50;
    font-weight: 600;
}

.yummyit-summary-item span {
    color: #666;
}

/* Room Selection */
.yummyit-room-selection {
    margin: 30px 0;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
    width: 100%;
}

@media (min-width: 769px) {
    .yummyit-room-selection {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
    }
}

@media (max-width: 768px) {
    .yummyit-room-selection {
        grid-template-columns: 1fr !important;
        display: grid !important;
    }
}

.yummyit-room-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.yummyit-room-card:hover {
    border-color: #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.yummyit-room-card.selected {
    border-color: #d4af37;
    background: #fffbf0;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.2);
}

/* Stile per sala non selezionata (solo quando tableSelectionMode è room_only) */
.yummyit-room-selection.room-only-mode .yummyit-room-card:not(.selected) {
    opacity: 0.5;
    background: #f5f5f5;
    filter: grayscale(0.3);
}

.yummyit-room-header {
    margin-bottom: 20px;
}

.yummyit-room-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.yummyit-room-card h3 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.yummyit-room-description {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Floorplan View */
.yummyit-floorplan-container {
    margin-top: 20px;
    overflow-x: auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.yummyit-floorplan-grid {
    display: grid;
    gap: 1px;
    background: #fff;
    border: 2px solid #ddd;
    padding: 2px;
    margin: 0 auto;
    position: relative;
}

.yummyit-floorplan-grid .grid-cell {
    background: #fff;
    border: 1px solid #f0f0f0;
    min-width: 30px;
    min-height: 30px;
}

.yummyit-floorplan-grid .grid-cell.wall {
    background: #646970;
    border-color: #1d2327;
}

/* Table Items */
.yummyit-table-item {
    position: absolute;
    background: #2271b1;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
    z-index: 10;
    box-sizing: border-box;
    border-radius: 4px;
    border: 2px solid transparent;
}

.yummyit-table-item .table-number {
    font-size: 12px;
    line-height: 1;
    font-weight: bold;
}

.yummyit-table-item .table-seats {
    font-size: 9px;
    opacity: 0.9;
    margin-top: 2px;
}

.yummyit-table-item.available {
    background: #4caf50;
    cursor: pointer;
}

.yummyit-table-item.available:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 15;
}

.yummyit-table-item.occupied {
    background: #757575;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tavoli non disponibili (non available) - non hanno classe .available */
.yummyit-table-item:not(.available):not(.occupied) {
    background: #e0e0e0;
    opacity: 0.5;
    cursor: not-allowed;
}

.yummyit-table-item:not(.available):not(.occupied) .table-number,
.yummyit-table-item:not(.available):not(.occupied) .table-seats {
    opacity: 0.6;
}

.yummyit-table-item.selected {
    border-color: #ffeb3b;
    box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.5);
    z-index: 20;
}

/* Tavoli non selezionabili perché troppo distanti */
.yummyit-table-item.not-selectable {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(50%);
}

.yummyit-table-item.not-selectable:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Feedback selezione posti */
.yummyit-selection-feedback {
    margin-top: 15px;
    padding: 12px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
}

/* Recap */
.yummyit-recap-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
}

.yummyit-recap-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.yummyit-recap-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.yummyit-recap-section h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.yummyit-recap-section p {
    margin: 10px 0;
    color: #555;
    line-height: 1.8;
}

.yummyit-recap-section strong {
    color: #2c3e50;
    margin-right: 10px;
    min-width: 150px;
    display: inline-block;
}

/* Messages */
.yummyit-form-messages {
    margin: 20px 0;
    min-height: 50px;
}

.yummyit-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
}

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

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

.yummyit-info-message {
    padding: 15px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 8px;
    margin: 15px 0;
}

.yummyit-loading-rooms,
.yummyit-loading-times {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .yummyit-reservation-form {
        padding: 20px 10px;
    }

    .yummyit-form {
        padding: 30px 20px;
    }

    .yummyit-steps-indicator {
        padding: 0 10px;
    }

    .yummyit-step-label {
        font-size: 10px;
    }

    .yummyit-step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .yummyit-form-row {
        grid-template-columns: 1fr;
    }

    .yummyit-step-actions {
        flex-direction: column;
    }

    .yummyit-btn {
        width: 100%;
    }

    .yummyit-floorplan-container {
        padding: 10px;
        overflow-x: auto;
    }
}
