/**
 * Aleotti Booking - Frontend Styles
 */

.aleotti-booking-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.aleotti-booking-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.aleotti-booking-form {
    display: block;
}

.ab-form-row {
    margin-bottom: 20px;
}

.ab-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .ab-form-row-half {
        grid-template-columns: 1fr;
    }
}

.ab-form-field {
    display: flex;
    flex-direction: column;
}

.ab-form-field label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.ab-form-field label .required {
    color: #e74c3c;
}

.ab-form-field input[type="text"],
.ab-form-field input[type="email"],
.ab-form-field input[type="tel"],
.ab-form-field input[type="date"],
.ab-form-field select,
.ab-form-field textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.ab-form-field input[type="text"]:focus,
.ab-form-field input[type="email"]:focus,
.ab-form-field input[type="tel"]:focus,
.ab-form-field input[type="date"]:focus,
.ab-form-field select:focus,
.ab-form-field textarea:focus {
    outline: none;
    border-color: #3498db;
}

.ab-form-field select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.ab-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.ab-loading {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
    color: #999;
}

.ab-submit-button {
    width: 100%;
    padding: 15px 30px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ab-submit-button:hover {
    background: #c0392b;
}

.ab-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ab-form-privacy {
    text-align: center;
    margin-top: 15px;
    color: #666;
}

.ab-form-messages {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}

.ab-form-messages.show {
    display: block;
}

.ab-form-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ab-form-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ab-form-messages.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Spinner for loading */
.ab-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: ab-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes ab-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .aleotti-booking-form-wrapper {
        padding: 20px;
    }

    .aleotti-booking-title {
        font-size: 24px;
    }

    .ab-form-field input,
    .ab-form-field select,
    .ab-form-field textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
