/**
 * WAHRB Frontend Styles - Modern Light Theme
 *
 * @package DokanRentalsBookings
 */

/* ==========================================================================
   Design Tokens (Shared)
   ========================================================================== */
:root {
    /* Colors */
    --wahrb-primary: #2563eb;
    --wahrb-primary-hover: #1d4ed8;
    --wahrb-primary-light: #eff6ff;
    --wahrb-secondary: #64748b;
    --wahrb-success: #10b981;
    --wahrb-success-light: #ecfdf5;
    --wahrb-warning: #f59e0b;
    --wahrb-warning-light: #fffbeb;
    --wahrb-danger: #ef4444;
    --wahrb-danger-light: #fef2f2;
    --wahrb-info: #0ea5e9;
    --wahrb-info-light: #f0f9ff;

    /* Neutrals */
    --wahrb-white: #ffffff;
    --wahrb-gray-50: #f8fafc;
    --wahrb-gray-100: #f1f5f9;
    --wahrb-gray-200: #e2e8f0;
    --wahrb-gray-300: #cbd5e1;
    --wahrb-gray-400: #94a3b8;
    --wahrb-gray-500: #64748b;
    --wahrb-gray-600: #475569;
    --wahrb-gray-700: #334155;
    --wahrb-gray-800: #1e293b;
    --wahrb-gray-900: #0f172a;

    /* Typography */
    --wahrb-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --wahrb-font-size-xs: 0.75rem;
    --wahrb-font-size-sm: 0.875rem;
    --wahrb-font-size-base: 1rem;
    --wahrb-font-size-lg: 1.125rem;
    --wahrb-font-size-xl: 1.25rem;
    --wahrb-font-size-2xl: 1.5rem;

    /* Spacing */
    --wahrb-spacing-xs: 0.25rem;
    --wahrb-spacing-sm: 0.5rem;
    --wahrb-spacing-md: 1rem;
    --wahrb-spacing-lg: 1.5rem;
    --wahrb-spacing-xl: 2rem;

    /* Borders */
    --wahrb-radius-sm: 0.375rem;
    --wahrb-radius-md: 0.5rem;
    --wahrb-radius-lg: 0.75rem;
    --wahrb-radius-xl: 1rem;
    --wahrb-radius-full: 9999px;

    /* Shadows - Flat design (no shadows) */
    --wahrb-shadow-sm: none;
    --wahrb-shadow: none;
    --wahrb-shadow-md: none;
}

/* ==========================================================================
   Booking Form
   ========================================================================== */
.wahrb-booking-form {
    font-family: var(--wahrb-font-family);
    padding: var(--wahrb-spacing-xl);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-xl);
    margin-top: var(--wahrb-spacing-lg);
}

.wahrb-booking-title {
    margin: 0 0 var(--wahrb-spacing-md);
    font-size: var(--wahrb-font-size-lg);
    font-weight: 600;
    color: var(--wahrb-gray-900);
}

/* ==========================================================================
   Price Display
   ========================================================================== */
.wahrb-price-display {
    display: flex;
    align-items: baseline;
    gap: var(--wahrb-spacing-sm);
    margin-bottom: var(--wahrb-spacing-lg);
    padding: var(--wahrb-spacing-md);
    background: var(--wahrb-primary-light);
    border-radius: var(--wahrb-radius-md);
}

.wahrb-price-amount {
    font-size: var(--wahrb-font-size-2xl);
    font-weight: 700;
    color: var(--wahrb-primary);
}

.wahrb-price-unit {
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-600);
}

.wahrb-security-notice {
    display: flex;
    align-items: center;
    gap: var(--wahrb-spacing-sm);
    padding: var(--wahrb-spacing-md);
    margin-bottom: var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-md);
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-600);
}

.wahrb-security-notice::before {
    content: "🔒";
    font-size: 1rem;
}

/* ==========================================================================
   Date Picker
   ========================================================================== */
.wahrb-date-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--wahrb-spacing-md);
    margin-bottom: var(--wahrb-spacing-lg);
}

.wahrb-date-field,
.wahrb-qty-field {
    display: flex;
    flex-direction: column;
}

.wahrb-date-field label,
.wahrb-qty-field label {
    display: block;
    margin-bottom: var(--wahrb-spacing-sm);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
    color: var(--wahrb-gray-700);
}

.wahrb-date-field input,
.wahrb-qty-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--wahrb-font-size-base);
    font-family: var(--wahrb-font-family);
    color: var(--wahrb-gray-800);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-300);
    border-radius: var(--wahrb-radius-md);
    outline: none;
}

.wahrb-date-field input:focus,
.wahrb-qty-field input:focus {
    border-color: var(--wahrb-primary);
    background: var(--wahrb-primary-light);
}

.wahrb-date-field input:disabled,
.wahrb-qty-field input:disabled {
    background: var(--wahrb-gray-100);
    cursor: not-allowed;
}

/* ==========================================================================
   Availability Status
   ========================================================================== */
.wahrb-availability-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--wahrb-spacing-sm);
    margin-bottom: var(--wahrb-spacing-lg);
    padding: var(--wahrb-spacing-md);
    border-radius: var(--wahrb-radius-md);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 500;
}

.wahrb-loading {
    background: var(--wahrb-gray-50);
    color: var(--wahrb-gray-600);
    border: 1px solid var(--wahrb-gray-200);
}

.wahrb-available {
    background: var(--wahrb-success-light);
    color: #047857;
    border: 1px solid #a7f3d0;
}

.wahrb-unavailable {
    background: var(--wahrb-danger-light);
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.wahrb-status-icon {
    font-weight: bold;
}

.wahrb-available .wahrb-status-icon::before {
    content: "✓";
}

.wahrb-unavailable .wahrb-status-icon::before {
    content: "✕";
}

/* ==========================================================================
   Price Breakdown
   ========================================================================== */
.wahrb-price-breakdown {
    margin-bottom: var(--wahrb-spacing-lg);
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
    overflow: hidden;
}

.wahrb-breakdown-header {
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    font-size: var(--wahrb-font-size-sm);
    font-weight: 600;
    color: var(--wahrb-gray-700);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-breakdown-content {
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
}

.wahrb-breakdown-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--wahrb-spacing-sm) 0;
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-600);
}

.wahrb-breakdown-line:not(:last-child) {
    border-bottom: 1px dashed var(--wahrb-gray-200);
}

.wahrb-breakdown-line .wahrb-line-label {
    color: var(--wahrb-gray-600);
}

.wahrb-breakdown-line .wahrb-line-value {
    font-weight: 500;
    color: var(--wahrb-gray-800);
}

.wahrb-breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-lg);
    background: var(--wahrb-gray-50);
    border-top: 1px solid var(--wahrb-gray-200);
}

.wahrb-breakdown-total .wahrb-total-label {
    font-size: var(--wahrb-font-size-base);
    font-weight: 600;
    color: var(--wahrb-gray-800);
}

.wahrb-total-amount {
    font-size: var(--wahrb-font-size-xl);
    font-weight: 700;
    color: var(--wahrb-primary);
}

/* ==========================================================================
   Add to Cart Button
   ========================================================================== */
.wahrb-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: var(--wahrb-spacing-md) var(--wahrb-spacing-xl);
    font-family: var(--wahrb-font-family);
    font-size: var(--wahrb-font-size-base);
    font-weight: 600;
    color: var(--wahrb-white);
    background: var(--wahrb-primary);
    border: none;
    border-radius: var(--wahrb-radius-md);
    cursor: pointer;
    outline: none;
}

.wahrb-add-to-cart:hover {
    background: var(--wahrb-primary-hover);
}

.wahrb-add-to-cart:disabled {
    background: var(--wahrb-gray-300);
    color: var(--wahrb-gray-500);
    cursor: not-allowed;
}

/* ==========================================================================
   Constraints Info
   ========================================================================== */
.wahrb-constraints-info {
    margin-top: var(--wahrb-spacing-md);
    padding: var(--wahrb-spacing-sm);
    text-align: center;
    font-size: var(--wahrb-font-size-xs);
    color: var(--wahrb-gray-500);
}

/* ==========================================================================
   Calendar Widget
   ========================================================================== */
.wahrb-calendar {
    background: var(--wahrb-white);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-xl);
    overflow: hidden;
}

.wahrb-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--wahrb-spacing-lg);
    background: var(--wahrb-primary);
}

.wahrb-calendar-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--wahrb-radius-md);
    color: var(--wahrb-white);
    font-size: var(--wahrb-font-size-lg);
    cursor: pointer;
}

.wahrb-calendar-header button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wahrb-calendar-month {
    font-size: var(--wahrb-font-size-lg);
    font-weight: 600;
    color: var(--wahrb-white);
}

.wahrb-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--wahrb-gray-50);
    border-bottom: 1px solid var(--wahrb-gray-200);
}

.wahrb-calendar-weekday {
    padding: var(--wahrb-spacing-md);
    text-align: center;
    font-size: var(--wahrb-font-size-xs);
    font-weight: 600;
    color: var(--wahrb-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wahrb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--wahrb-gray-200);
}

.wahrb-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wahrb-white);
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-700);
    cursor: pointer;
}

.wahrb-calendar-day:hover {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-calendar-day.empty {
    background: var(--wahrb-gray-50);
    cursor: default;
}

.wahrb-calendar-day.disabled {
    color: var(--wahrb-gray-400);
    background: var(--wahrb-gray-50);
    cursor: not-allowed;
}

.wahrb-calendar-day.unavailable {
    background: var(--wahrb-danger-light);
    color: #b91c1c;
    cursor: not-allowed;
}

.wahrb-calendar-day.selected {
    background: var(--wahrb-primary);
    color: var(--wahrb-white);
    font-weight: 600;
}

.wahrb-calendar-day.in-range {
    background: var(--wahrb-primary-light);
    color: var(--wahrb-primary);
}

.wahrb-calendar-day.today {
    font-weight: 700;
    border: 2px solid var(--wahrb-primary);
}

/* ==========================================================================
   Product Page Integration
   ========================================================================== */
.wahrb-product-rental-info {
    padding: var(--wahrb-spacing-lg);
    margin: var(--wahrb-spacing-lg) 0;
    background: var(--wahrb-gray-50);
    border: 1px solid var(--wahrb-gray-200);
    border-radius: var(--wahrb-radius-lg);
}

.wahrb-product-rental-info h4 {
    margin: 0 0 var(--wahrb-spacing-md);
    font-size: var(--wahrb-font-size-base);
    font-weight: 600;
    color: var(--wahrb-gray-800);
}

.wahrb-rental-features {
    display: flex;
    flex-direction: column;
    gap: var(--wahrb-spacing-sm);
}

.wahrb-rental-feature {
    display: flex;
    align-items: center;
    gap: var(--wahrb-spacing-sm);
    font-size: var(--wahrb-font-size-sm);
    color: var(--wahrb-gray-600);
}

.wahrb-rental-feature-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wahrb-success-light);
    border-radius: var(--wahrb-radius-full);
    color: var(--wahrb-success);
    font-size: var(--wahrb-font-size-xs);
}

/* ==========================================================================
   Deposit and Security Labels
   ========================================================================== */
.wahrb-deposit-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--wahrb-spacing-xs);
    padding: var(--wahrb-spacing-xs) var(--wahrb-spacing-sm);
    background: var(--wahrb-warning-light);
    border-radius: var(--wahrb-radius-sm);
    font-size: var(--wahrb-font-size-xs);
    font-weight: 500;
    color: #b45309;
}

.wahrb-security-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--wahrb-spacing-xs);
    padding: var(--wahrb-spacing-xs) var(--wahrb-spacing-sm);
    background: var(--wahrb-info-light);
    border-radius: var(--wahrb-radius-sm);
    font-size: var(--wahrb-font-size-xs);
    font-weight: 500;
    color: #0369a1;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .wahrb-booking-form {
        padding: var(--wahrb-spacing-lg);
        margin-top: var(--wahrb-spacing-md);
    }

    .wahrb-date-picker {
        grid-template-columns: 1fr;
    }

    .wahrb-price-display {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--wahrb-spacing-xs);
    }

    .wahrb-breakdown-content,
    .wahrb-breakdown-total {
        padding: var(--wahrb-spacing-md);
    }
}

@media (max-width: 480px) {
    .wahrb-booking-form {
        padding: var(--wahrb-spacing-md);
        border-radius: var(--wahrb-radius-lg);
    }

    .wahrb-calendar-header {
        padding: var(--wahrb-spacing-md);
    }

    .wahrb-calendar-day {
        font-size: var(--wahrb-font-size-xs);
    }
}