/**
 * Professional Form Styling
 * Modern, clean design for booking forms
 */

.quote-form {
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

.quote-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFC107 0%, #FFD54F 50%, #FFC107 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.quote-form h3 {
    font-size: 32px;
    font-weight: 800;
    color: #1A1A1A;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -1px;
    position: relative;
}

.quote-form::after {
    content: 'Fill the form below to get instant quote';
    display: block;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
    margin-bottom: 30px;
    font-weight: 500;
}

.quote-form .form-group {
    margin-bottom: 20px;
    position: relative;
    animation: fadeIn 0.5s ease-out backwards;
}

.quote-form .form-group:nth-child(1) { animation-delay: 0.1s; }
.quote-form .form-group:nth-child(2) { animation-delay: 0.15s; }
.quote-form .form-group:nth-child(3) { animation-delay: 0.2s; }
.quote-form .form-group:nth-child(4) { animation-delay: 0.25s; }
.quote-form .form-group:nth-child(5) { animation-delay: 0.3s; }
.quote-form .form-group:nth-child(6) { animation-delay: 0.35s; }
.quote-form .form-group:nth-child(7) { animation-delay: 0.4s; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.quote-form input[type="text"],
.quote-form input[type="email"],
.quote-form input[type="tel"],
.quote-form input[type="date"],
.quote-form select {
    width: 100%;
    padding: 16px 20px;
    padding-left: 48px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    color: #1A1A1A;
    background: #FFFFFF;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-weight: 500;
}

.quote-form input[type="text"]:hover,
.quote-form input[type="email"]:hover,
.quote-form input[type="tel"]:hover,
.quote-form input[type="date"]:hover,
.quote-form select:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quote-form input[type="text"]:focus,
.quote-form input[type="email"]:focus,
.quote-form input[type="tel"]:focus,
.quote-form input[type="date"]:focus,
.quote-form select:focus {
    outline: none;
    border-color: #FFC107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15), 0 8px 20px rgba(255, 193, 7, 0.1);
    background: #FFFEF8;
    transform: translateY(-2px);
}

.quote-form input::placeholder {
    color: #9CA3AF;
    font-size: 14px;
    font-weight: 400;
}

/* Add Icons to Input Fields */
.quote-form .form-group::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 16px;
    color: #9CA3AF;
    z-index: 1;
    transition: color 0.3s ease;
}

.quote-form .form-group:has(input[name="name"])::before {
    content: '\f007'; /* user icon */
}

.quote-form .form-group:has(input[name="email"])::before {
    content: '\f0e0'; /* envelope icon */
}

.quote-form .form-group:has(input[name="pickup"])::before {
    content: '\f3c5'; /* map marker icon */
}

.quote-form .form-group:has(input[name="destination"])::before {
    content: '\f276'; /* location arrow icon */
}

.quote-form .form-group:has(input[name="travel_date"])::before {
    content: '\f073'; /* calendar icon */
}

.quote-form .form-group:has(select[name="vehicle"])::before {
    content: '\f1b9'; /* car icon */
}

.quote-form .form-group:focus-within::before {
    color: #FFC107;
}

/* Phone Input Group */
.phone-input {
    display: flex;
    gap: 12px;
}

.phone-input .country-code {
    width: 130px;
    flex-shrink: 0;
    padding: 16px 16px;
    padding-left: 16px !important;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
    background: #F9FAFB;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-input .country-code:hover {
    border-color: #D1D5DB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: #FFFFFF;
}

.phone-input .country-code:focus {
    outline: none;
    border-color: #FFC107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15), 0 8px 20px rgba(255, 193, 7, 0.1);
    background: #FFFEF8;
    transform: translateY(-2px);
}

.phone-input input[type="tel"] {
    flex: 1;
}

/* Phone input icon */
.quote-form .form-group:has(.phone-input)::before {
    content: '\f3cd'; /* phone icon */
    left: 152px;
}

/* Date Input Styling */
.quote-form input[type="date"] {
    cursor: pointer;
    color: #1A1A1A;
}

.quote-form input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: opacity(0.6);
}

.quote-form input[type="date"]:hover::-webkit-calendar-picker-indicator {
    filter: opacity(1);
}

/* Select Dropdown */
.quote-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231A1A1A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.quote-form select option {
    padding: 10px;
    font-size: 15px;
}

/* Submit Button */
.quote-form button[type="submit"],
.quote-form .btn-submit {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #FFC107 0%, #FFB300 100%);
    color: #1A1A1A;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.4), 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out 0.45s backwards;
}

.quote-form button[type="submit"]::before,
.quote-form .btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quote-form button[type="submit"]:hover::before,
.quote-form .btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.quote-form button[type="submit"]:hover,
.quote-form .btn-submit:hover {
    background: linear-gradient(135deg, #FFD54F 0%, #FFC107 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 193, 7, 0.5), 0 8px 16px rgba(0, 0, 0, 0.15);
}

.quote-form button[type="submit"]:active,
.quote-form .btn-submit:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.quote-form button[type="submit"]::after,
.quote-form .btn-submit::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.quote-form button[type="submit"]:hover::after,
.quote-form .btn-submit:hover::after {
    transform: translateX(5px);
}

/* Form Labels (if any) */
.quote-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

/* Error States */
.quote-form input:invalid:not(:placeholder-shown),
.quote-form select:invalid:not(:placeholder-shown) {
    border-color: #EF4444;
}

/* Success States */
.quote-form input:valid:not(:placeholder-shown),
.quote-form select:valid {
    border-color: #10B981;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quote-form {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .quote-form h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .phone-input {
        flex-direction: column;
        gap: 12px;
    }
    
    .phone-input .country-code {
        width: 100%;
    }
    
    .quote-form input[type="text"],
    .quote-form input[type="email"],
    .quote-form input[type="tel"],
    .quote-form input[type="date"],
    .quote-form select {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .quote-form button[type="submit"],
    .quote-form .btn-submit {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Loading State */
.quote-form button[type="submit"].loading,
.quote-form .btn-submit.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.quote-form button[type="submit"].loading::after,
.quote-form .btn-submit.loading::after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* Trust Badges */
.quote-form .trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
    font-size: 12px;
    color: #6B7280;
}

.quote-form .trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.quote-form .trust-badge i {
    color: #10B981;
    font-size: 14px;
}

/* Floating Labels Effect */
.quote-form .form-group.has-value label,
.quote-form .form-group:focus-within label {
    transform: translateY(-24px) scale(0.85);
    color: #FFC107;
}

/* Progress Indicator */
.quote-form .form-progress {
    height: 3px;
    background: #E5E7EB;
    border-radius: 10px;
    margin-bottom: 25px;
    overflow: hidden;
    position: relative;
}

.quote-form .form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFC107, #FFD54F);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

/* Micro-interactions */
.quote-form input:valid:not(:placeholder-shown) {
    border-color: #10B981;
}

.quote-form input:valid:not(:placeholder-shown) ~ .checkmark {
    display: block;
}

.quote-form .checkmark {
    display: none;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #10B981;
    font-size: 16px;
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: translateY(-50%) scale(0); }
    50% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}
