/* 🎨 Beautiful Booking Form - Enhanced Design v1.1.0 */

/* Container - Modern Glass Design */
.dlh-booking-form-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

/* Header Section */
.dlh-form-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    margin: 0;
    padding: 35px 30px;
    font-size: 32px;
    font-weight: 700;
    border-radius: 20px 20px 0 0;
    position: relative;
    letter-spacing: -0.5px;
}

.dlh-form-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.dlh-form-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Form Content Area */
.dlh-booking-form {
    padding: 40px 35px 35px;
    background: white;
    border-radius: 0 0 20px 20px;
}

/* Form Layout - Enhanced Responsive Grid */
.dlh-form-row {
    display: grid;
    gap: 25px;
    margin-bottom: 25px;
}

.dlh-form-row:has(.dlh-full-width) {
    grid-template-columns: 1fr;
}

.dlh-form-row:not(:has(.dlh-full-width)) {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dlh-form-group {
    position: relative;
}

/* Labels - Modern Icon Design */
.dlh-form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #fff;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.dlh-form-label .required {
    color: #e53e3e;
    margin-left: 4px;
    font-size: 16px;
}

/* Form Controls - Beautiful Input Design */
.dlh-form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    position: relative;
}

.dlh-form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.dlh-form-control:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 
        0 0 0 3px rgba(102, 126, 234, 0.1),
        0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
    background: #fefeff;
}

.dlh-form-control:hover:not(:focus) {
    border-color: #cbd5e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dlh-form-control.error {
    border-color: #e53e3e;
    box-shadow: 
        0 0 0 3px rgba(229, 62, 62, 0.1),
        0 4px 12px rgba(229, 62, 62, 0.15);
    background: #fef5f5;
}

/* Textarea Specific */
textarea.dlh-form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    font-family: inherit;
}

/* Select Specific */
select.dlh-form-control {
    cursor: pointer;
    padding-right: 50px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    appearance: none;
}

/* Error Messages - Elegant Design */
.dlh-error-message {
    color: #e53e3e;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background: rgba(229, 62, 62, 0.05);
    border-radius: 8px;
    border-left: 3px solid #e53e3e;
}

.dlh-error-message.show {
    display: block;
    animation: slideInError 0.3s ease-out;
}

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

/* Submit Button - Stunning Gradient Button */
.dlh-submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 
        0 10px 25px rgba(102, 126, 234, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.dlh-submit-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.dlh-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 15px 35px rgba(102, 126, 234, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.dlh-submit-btn:hover::before {
    left: 100%;
}

.dlh-submit-btn:active {
    transform: translateY(-1px);
}

.dlh-submit-btn:disabled {
    background: linear-gradient(135deg, #a0aec0 0%, #9ca3af 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.dlh-btn-text, .dlh-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dlh-btn-loading {
    display: none;
}

/* Success Message - Celebration Design */
.dlh-success-message {
    text-align: center;
    padding: 50px 35px;
    position: relative;
}

.dlh-success-content {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border: 2px solid #38a169;
    border-radius: 20px;
    padding: 50px 40px;
    color: #22543d;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(56, 161, 105, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.dlh-success-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: successShimmer 2s infinite;
}

@keyframes successShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.dlh-success-icon {
    font-size: 64px;
    margin-bottom: 25px;
    animation: successBounce 1s ease-in-out;
    filter: drop-shadow(0 4px 8px rgba(56, 161, 105, 0.3));
}

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-15px) scale(1.1); }
    60% { transform: translateY(-8px) scale(1.05); }
}

.dlh-success-content h3 {
    color: #22543d;
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.dlh-success-content p {
    margin: 0 0 30px 0;
    font-size: 17px;
    line-height: 1.7;
    color: #2f855a;
}

/* Redirect Countdown - Elegant Timer */
#dlh_redirect_countdown {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border: 2px solid #3182ce;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
}

#dlh_redirect_countdown p {
    margin: 0;
    color: #2b6cb0;
    font-weight: 600;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#dlh_countdown_number {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(49, 130, 206, 0.3);
    animation: countdownPulse 1s infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.dlh-btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(113, 128, 150, 0.3);
}

.dlh-btn-secondary:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(113, 128, 150, 0.4);
}

/* Loading Overlay - Modern Glassmorphism */
.dlh-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dlh-loading-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    max-width: 350px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dlh-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

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

.dlh-loading-content p {
    margin: 0;
    color: #2d3748;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Error Alert - Modern Alert Design */
.dlh-error-alert {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    border: 2px solid #fc8181;
    border-left: 6px solid #e53e3e;
    animation: slideInDown 0.4s ease-out;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.15);
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.dlh-error-alert strong {
    font-weight: 700;
    margin-right: 8px;
}

/* Phone Number Formatting Indicator */
.dlh-form-control.phone-formatting {
    border-color: #38a169;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Field Focus Animation */
.dlh-form-group {
    position: relative;
}

.dlh-form-control:focus + .dlh-form-label::before {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Field Icons Enhancement */
.dlh-form-label {
    position: relative;
}

.dlh-form-label::before {
    transition: all 0.3s ease;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .dlh-booking-form-container {
        margin: 20px 15px;
        border-radius: 16px;
    }

    .dlh-form-title {
        font-size: 26px;
        padding: 30px 25px;
        border-radius: 16px 16px 0 0;
    }

    .dlh-booking-form {
        padding: 30px 25px;
        border-radius: 0 0 16px 16px;
    }

    .dlh-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .dlh-form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 16px 18px;
    }

    .dlh-submit-btn {
        font-size: 16px;
        padding: 16px 25px;
        min-height: 58px;
    }

    .dlh-success-icon {
        font-size: 48px;
    }

    .dlh-success-content h3 {
        font-size: 24px;
    }

    .dlh-success-content {
        padding: 40px 30px;
    }

    .dlh-loading-content {
        padding: 40px 30px;
        max-width: 320px;
    }

    .dlh-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }

    #dlh_countdown_number {
        font-size: 15px;
        padding: 6px 12px;
        min-width: 90px;
    }
}

@media (max-width: 480px) {
    .dlh-booking-form-container {
        margin: 15px 10px;
        border-radius: 14px;
    }

    .dlh-form-title {
        font-size: 22px;
        padding: 25px 20px;
    }

    .dlh-booking-form {
        padding: 25px 20px;
    }

    .dlh-submit-btn {
        font-size: 15px;
        padding: 14px 20px;
        min-height: 54px;
    }

    .dlh-form-control {
        padding: 14px 16px;
    }

    .dlh-success-content {
        padding: 35px 25px;
    }

    #dlh_redirect_countdown {
        padding: 16px;
    }

    #dlh_countdown_number {
        font-size: 14px;
        padding: 6px 10px;
        min-width: 80px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dlh-booking-form-container {
        background: linear-gradient(145deg, #2d3748 0%, #1a202c 100%);
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.4),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }

    .dlh-booking-form {
        background: #2d3748;
        color: #e2e8f0;
    }

    .dlh-form-control {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #4a5568;
    }

    .dlh-form-control:focus {
        background: #2d3748;
        border-color: #667eea;
    }

    .dlh-form-label {
        color: #e2e8f0;
    }

    .dlh-loading-content {
        background: rgba(45, 55, 72, 0.95);
        color: #e2e8f0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .dlh-form-control {
        border-width: 3px;
    }

    .dlh-submit-btn {
        border: 2px solid #000;
    }

    .dlh-form-control:focus {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .dlh-submit-btn:hover {
        transform: none;
    }

    .dlh-success-icon {
        animation: none;
    }

    .dlh-spinner {
        animation: none;
        border: 4px solid #667eea;
    }
}

/* Print Styles */
@media print {
    .dlh-booking-form-container {
        box-shadow: none;
        border: 2px solid #000;
        background: white;
    }

    .dlh-form-title {
        background: #667eea;
        color: white;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .dlh-submit-btn,
    .dlh-loading-overlay {
        display: none !important;
    }

    .dlh-form-control {
        border: 2px solid #000;
        background: white;
    }
}

/* Focus Visible for Accessibility */
.dlh-form-control:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.dlh-submit-btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Selection Styles */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Textarea */
.dlh-form-control::-webkit-scrollbar {
    width: 8px;
}

.dlh-form-control::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.dlh-form-control::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.dlh-form-control::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Enhanced Hover Effects */
.dlh-form-group:hover .dlh-form-label {
    color: #667eea;
    transition: color 0.2s ease;
}

/* Floating Label Effect (Optional Enhancement) */
.dlh-form-group.floating-label {
    position: relative;
}

.dlh-form-group.floating-label .dlh-form-label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: white;
    padding: 0 8px;
    pointer-events: none;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #a0aec0;
}

.dlh-form-group.floating-label .dlh-form-control:focus + .dlh-form-label,
.dlh-form-group.floating-label .dlh-form-control:not(:placeholder-shown) + .dlh-form-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

/* Micro-interactions */
.dlh-form-control:valid {
    border-color: #38a169;
}

.dlh-form-control:valid:not(:focus) {
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

/* Success Animation for Valid Fields */
.dlh-form-control.field-success {
    border-color: #38a169;
    animation: fieldSuccess 0.5s ease-out;
}

@keyframes fieldSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Enhanced Button States */
.dlh-submit-btn:hover .dlh-btn-text {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

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

/* Form Completion Progress Indicator */
.dlh-form-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    opacity: 0.8;
}

/* Enhanced Success Actions */
.dlh-success-actions {
    margin-top: 25px;
}

.dlh-success-actions .dlh-btn-secondary {
    margin: 0 8px;
}