/**
 * Premium Responsive Stylesheet - Bike Box Rental Booking Form
 */

/* Container & Layout */
.bbb-booking-widget-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.bbb-booking-card {
    width: 100%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 45px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Header typography */
.bbb-booking-header {
    text-align: center;
    margin-bottom: 35px;
}

.bbb-booking-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-transform: uppercase;
}

.bbb-booking-header p {
    margin: 0;
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.5;
}

/* Grid & Inputs */
.bbb-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
}

.bbb-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.bbb-col-6 {
    flex: 0 0 calc(50% - 10px);
    width: calc(50% - 10px);
}

.bbb-col-12 {
    flex: 0 0 100%;
    width: 100%;
}

.bbb-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.2px;
}

.bbb-required {
    color: #f43f5e;
    margin-left: 2px;
}

.bbb-input-container {
    position: relative;
    width: 100%;
}

/* Inputs & Textareas fields styles */
.bbb-input-container input,
.bbb-input-container textarea {
    width: 100%;
    padding: 14px 16px 14px 45px;
    background-color: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.bbb-input-container textarea {
    padding-top: 14px;
    resize: vertical;
}

/* Vector icon positioning */
.bbb-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    stroke: #64748b;
    fill: none;
    transition: all 0.3s ease;
    pointer-events: none;
}

.bbb-input-container textarea ~ .bbb-input-icon {
    top: 24px;
}

/* CSS Focus States using focus-within */
.bbb-input-container input:focus,
.bbb-input-container textarea:focus {
    border-color: #f59e0b;
    background-color: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.bbb-input-container:focus-within .bbb-input-icon {
    stroke: #f59e0b;
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.4));
}

/* Validation shake effect */
.bbb-shake {
    animation: bbb-shake-anim 0.4s ease-in-out;
}

@keyframes bbb-shake-anim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Submit Button & Animations */
.bbb-submit-container {
    margin-top: 30px;
    width: 100%;
}

.bbb-submit-btn {
    width: 100%;
    background: #f59e0b;
    border: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 16px;
    padding: 16px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.bbb-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}

.bbb-scale-effect:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.bbb-submit-btn:active {
    transform: translateY(0) scale(1);
}

.bbb-submit-btn.bbb-loading {
    pointer-events: none;
    color: transparent;
}

.bbb-btn-spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    animation: rotate 1.8s linear infinite;
}

.bbb-btn-spinner .path {
    stroke: #0f172a;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

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

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Alert Notification Panel */
.bbb-alert-container {
    width: 100%;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease forwards;
}

.bbb-alert-error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fda4af;
}

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

/* Success State Overlay */
.bbb-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 10;
    animation: fadeIn 0.4s ease forwards;
}

.bbb-success-content {
    text-align: center;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bbb-success-content h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    margin: 20px 0 10px 0;
}

.bbb-success-msg-text {
    color: #94a3b8;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.bbb-reset-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbb-reset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Success Checkmark Drawer Animation */
.bbb-checkmark-circle {
    width: 72px;
    height: 72px;
    position: relative;
    border-radius: 50%;
    border: 3px solid #22c55e;
    background: rgba(34, 197, 94, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.bbb-checkmark-draw {
    width: 28px;
    height: 14px;
    border-left: 3px solid #22c55e;
    border-bottom: 3px solid #22c55e;
    transform: rotate(-45deg) translate(3px, -3px);
    animation: drawCheck 0.3s ease 0.3s forwards;
    opacity: 0;
}

@keyframes scaleUp {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes drawCheck {
    from {
        opacity: 0;
        width: 0;
        height: 0;
    }
    to {
        opacity: 1;
        width: 28px;
        height: 14px;
    }
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .bbb-col-6 {
        flex: 0 0 100%;
        width: 100%;
    }
    .bbb-booking-card {
        padding: 35px 25px;
    }
    .bbb-booking-header h2 {
        font-size: 24px;
    }
}

/* =========================================================================
   FLATPICKR SLEEK DARK THEME OVERRIDES
   ========================================================================= */
.flatpickr-calendar {
    background: rgba(15, 23, 42, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    font-family: inherit !important;
    width: 310px !important;
}

.flatpickr-months {
    padding: 8px 0 !important;
}

.flatpickr-months .flatpickr-month {
    color: #ffffff !important;
}

.flatpickr-current-month {
    font-size: 110% !important;
    color: #ffffff !important;
}

.flatpickr-current-month select {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
}

.flatpickr-current-month .numInputWrapper span.arrowUp:after {
    border-bottom-color: #ffffff !important;
}

.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    border-top-color: #ffffff !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
    padding: 10px !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #f59e0b !important;
}

span.flatpickr-weekday {
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.flatpickr-day {
    color: #e2e8f0 !important;
    border-radius: 8px !important;
    margin: 2px !important;
    max-width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    transition: all 0.2s ease !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

.flatpickr-day.today {
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
    font-weight: 700 !important;
}

.flatpickr-day.today:hover {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: rgba(255, 255, 255, 0.15) !important;
    background: transparent !important;
    border-color: transparent !important;
    cursor: not-allowed !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: rgba(255, 255, 255, 0.25) !important;
}
