/* Advanced Booking System - Frontend Styles */

:root {
    --abs-primary: #2563eb;
    --abs-secondary: #3b82f6;
    --abs-accent: #1e40af;
    --abs-gray-50: #f9fafb;
    --abs-gray-100: #f3f4f6;
    --abs-gray-200: #e5e7eb;
    --abs-gray-300: #d1d5db;
    --abs-gray-600: #4b5563;
    --abs-gray-700: #374151;
    --abs-gray-900: #111827;
}

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

.abs-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.abs-form-section {
    padding: 30px;
    border-bottom: 1px solid var(--abs-gray-200);
}

.abs-form-section:last-of-type {
    border-bottom: none;
}

.abs-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--abs-gray-900);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--abs-primary);
}

.abs-form-group {
    margin-bottom: 20px;
}

.abs-form-group:last-child {
    margin-bottom: 0;
}

.abs-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--abs-gray-700);
    margin-bottom: 8px;
}

.abs-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--abs-gray-300);
    border-radius: 8px;
    transition: all 0.2s;
    background: white;
    color: var(--abs-gray-900);
}

.abs-input:focus {
    outline: none;
    border-color: var(--abs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.abs-input:hover {
    border-color: var(--abs-secondary);
}

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

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

/* Location input styling */
.abs-location-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%234b5563" stroke-width="2"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"/><circle cx="12" cy="10" r="3"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

/* Tip options */
.abs-tip-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .abs-tip-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.abs-radio-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 2px solid var(--abs-gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.abs-radio-label:hover {
    border-color: var(--abs-secondary);
    background: var(--abs-gray-50);
}

.abs-tip-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.abs-tip-radio:checked + .abs-radio-text {
    color: white;
}

.abs-radio-label:has(.abs-tip-radio:checked) {
    background: var(--abs-primary);
    border-color: var(--abs-primary);
    color: white;
}

.abs-radio-text {
    font-weight: 500;
    font-size: 14px;
    color: var(--abs-gray-700);
    transition: color 0.2s;
}

.abs-custom-tip {
    margin-top: 12px;
}

/* Price section */
.abs-price-section {
    background: var(--abs-gray-50);
}

.abs-price-details {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--abs-gray-200);
}

.abs-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
    color: var(--abs-gray-700);
}

.abs-price-row:not(:last-child) {
    border-bottom: 1px solid var(--abs-gray-200);
}

.abs-total-row {
    font-size: 18px;
    color: var(--abs-gray-900);
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--abs-gray-300) !important;
}

.abs-total-row span {
    font-weight: 600;
}

/* Submit button */
.abs-submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--abs-primary), var(--abs-secondary));
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.abs-submit-btn:hover {
    background: linear-gradient(135deg, var(--abs-secondary), var(--abs-accent));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.abs-submit-btn:active {
    transform: translateY(0);
}

.abs-submit-btn:disabled {
    background: var(--abs-gray-300);
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.abs-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.abs-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.abs-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Google Maps Autocomplete styling */
.pac-container {
    border-radius: 8px;
    border: 1px solid var(--abs-gray-300);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pac-item {
    padding: 12px 16px;
    cursor: pointer;
    border-top: 1px solid var(--abs-gray-200);
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: var(--abs-gray-50);
}

.pac-item-query {
    color: var(--abs-gray-900);
    font-weight: 500;
}

/* Loading state */
.abs-submit-btn.loading {
    position: relative;
    color: transparent;
}

.abs-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: abs-spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .abs-booking-form {
        padding: 12px;
    }
    
    .abs-form-section {
        padding: 20px;
    }
    
    .abs-section-title {
        font-size: 18px;
    }
}

/* Accessibility */
.abs-input:focus-visible,
.abs-radio-label:focus-within {
    outline: 2px solid var(--abs-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .abs-submit-btn {
        display: none;
    }
}