/* Garage Primavera - Prenotazioni */

/* Reset isolato dal tema */
.gp-booking-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gp-booking-wrapper {
    font-family: 'Inter', sans-serif;
    max-width: 560px;
    margin: 0 auto;
}

/* Container principale */
.gp-booking-wrapper .booking-container {
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.gp-booking-wrapper .booking-header {
    background: #0066cc;
    padding: 20px 24px 16px;
    text-align: center;
    position: relative;
}

.gp-booking-wrapper .lang-switcher-wrapper {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.gp-booking-wrapper .lang-dropdown-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.gp-booking-wrapper .lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
    z-index: 100;
    min-width: 60px;
}

.gp-booking-wrapper .lang-dropdown.open {
    display: block;
}

.gp-booking-wrapper .lang-dropdown button {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.gp-booking-wrapper .lang-dropdown button:hover {
    background: #f0f4f8;
}

.gp-booking-wrapper .booking-header h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.gp-booking-wrapper .booking-header p {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    margin-top: 6px;
}

/* Corpo */
.gp-booking-wrapper .booking-body {
    padding: 24px 24px 32px;
}

/* Toggle Orario/Giornaliero */
.gp-booking-wrapper .toggle-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.gp-booking-wrapper .toggle-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.gp-booking-wrapper .toggle-btn:hover {
    border-color: #0066cc;
    background: #e8f4fd;
}

.gp-booking-wrapper .toggle-btn.active {
    border-color: #0066cc;
    background: #0066cc;
    color: #fff;
}

/* Selezioni veicolo */
.gp-booking-wrapper .vehicle-select {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.gp-booking-wrapper .vehicle-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
}

/* Icona veicolo: stessa altezza apparente per tutti */
.gp-booking-wrapper .vehicle-icon-box {
    display: block;
    margin: 0 auto 6px auto;
    text-align: center;
}

.gp-booking-wrapper .vehicle-icon-box img {
    height: 40px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.gp-booking-wrapper .vehicle-card:hover {
    border-color: #0066cc;
    background: #f8fbff;
}

.gp-booking-wrapper .vehicle-card.active {
    border-color: #0066cc;
    background: #e8f4fd;
}

.gp-booking-wrapper .vehicle-icon-svg {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
    stroke: #0066cc;
}

.gp-booking-wrapper .vehicle-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.gp-booking-wrapper .vehicle-rate {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.gp-booking-wrapper .vehicle-card input[type="radio"] {
    display: none;
}

/* Date e orari */
.gp-booking-wrapper .date-section {
    margin-bottom: 16px;
}

.gp-booking-wrapper .date-section.hidden {
    display: none;
}

.gp-booking-wrapper .input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.gp-booking-wrapper .input-group {
    margin-bottom: 12px;
}

.gp-booking-wrapper .input-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
}

.gp-booking-wrapper input,
.gp-booking-wrapper select,
.gp-booking-wrapper textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s;
}

.gp-booking-wrapper input:focus,
.gp-booking-wrapper select:focus,
.gp-booking-wrapper textarea:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,102,204,0.15);
}

.gp-booking-wrapper .error {
    border-color: #e53e3e !important;
}

.gp-booking-wrapper .phone-wrapper {
    display: flex;
    gap: 8px;
}

.gp-booking-wrapper .phone-wrapper select {
    width: 80px;
}

.gp-booking-wrapper .error-msg {
    display: none;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}

.gp-booking-wrapper .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Preventivo */
.gp-booking-wrapper .preventivo-box {
    background: #f8fbff;
    border: 1px solid #b3d4ff;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
}

.gp-booking-wrapper .preventivo-box .label {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

.gp-booking-wrapper .preventivo-box .price {
    font-size: 24px;
    font-weight: 700;
    color: #0066cc;
    margin: 4px 0;
}

.gp-booking-wrapper .preventivo-box .price-details {
    font-size: 12px;
    color: #666;
}

/* Pulsanti */
.gp-booking-wrapper .btn-primary,
.gp-booking-wrapper .btn-secondary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

.gp-booking-wrapper .btn-primary {
    background: #0066cc;
    color: #fff;
}

.gp-booking-wrapper .btn-primary:hover {
    background: #0052a3;
}

.gp-booking-wrapper .btn-primary:disabled {
    background: #a0c4e8;
    cursor: not-allowed;
}

.gp-booking-wrapper .btn-secondary {
    background: #f0f4f8;
    color: #333;
}

.gp-booking-wrapper .btn-secondary:hover {
    background: #e0e8f0;
}

/* Schermate (review, success) */
.gp-booking-wrapper .screen {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.gp-booking-wrapper .screen.active {
    display: block;
}

.gp-booking-wrapper .review-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.gp-booking-wrapper .review-container {
    margin-bottom: 12px;
}

.gp-booking-wrapper .review-section {
    background: #f8fbff;
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    padding: 12px;
}

.gp-booking-wrapper .review-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e0e8f0;
}

.gp-booking-wrapper .review-item:last-child {
    border-bottom: none;
}

.gp-booking-wrapper .review-label {
    font-size: 13px;
    color: #555;
}

.gp-booking-wrapper .review-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: right;
}

.gp-booking-wrapper .review-buttons {
    display: flex;
    gap: 10px;
}

.gp-booking-wrapper .review-buttons .btn-primary,
.gp-booking-wrapper .review-buttons .btn-secondary {
    margin-top: 0;
}

/* Schermata successo */
.gp-booking-wrapper .success-screen {
    display: none;
    text-align: center;
    padding: 24px 24px 32px;
}

.gp-booking-wrapper .success-screen.active {
    display: block;
}

.gp-booking-wrapper .success-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 12px;
}

.gp-booking-wrapper .success-screen h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 8px;
}

.gp-booking-wrapper .success-screen p {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.gp-booking-wrapper .booking-code {
    background: #f8fbff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    font-weight: 700;
    color: #0066cc;
    margin: 16px 0;
    display: inline-block;
    min-width: 120px;
}

.gp-booking-wrapper .qr-code-container {
    margin: 16px 0;
    text-align: center;
}

.gp-booking-wrapper #qrcode {
    display: inline-block;
    padding: 10px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
}

.gp-booking-wrapper #qrcode img,
.gp-booking-wrapper #qrcode canvas {
    display: block !important;
    margin: 0 auto !important;
}

.gp-booking-wrapper .qr-label {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Utility */
.gp-booking-wrapper .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Spinner */
.gp-booking-wrapper .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: gp-spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

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

/* Modal */
.gp-booking-wrapper .modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.gp-booking-wrapper .modal-overlay.active {
    display: flex;
}

.gp-booking-wrapper .modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gp-booking-wrapper .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fbff;
}

.gp-booking-wrapper .modal-header h2 {
    margin: 0;
    font-size: 16px;
}

.gp-booking-wrapper .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.gp-booking-wrapper .modal-bookings {
    overflow-y: auto;
    padding: 16px 20px;
}

.gp-booking-wrapper .booking-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 10px;
}

.gp-booking-wrapper .booking-item .booking-code {
    font-weight: 700;
    color: #0066cc;
    margin-right: 12px;
    min-width: 100px;
}

.gp-booking-wrapper .booking-item .booking-meta {
    flex: 1;
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

.gp-booking-wrapper .booking-item .booking-price {
    font-weight: 600;
    color: #333;
}

.gp-booking-wrapper .modal-stats {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* Responsive */
@media (max-width: 480px) {
    .gp-booking-wrapper .input-row,
    .gp-booking-wrapper .form-row {
        grid-template-columns: 1fr;
    }
    .gp-booking-wrapper .booking-body {
        padding: 16px;
    }
    .gp-booking-wrapper .review-buttons {
        flex-direction: column;
    }
}
