/**
 * RentStack Frontend Styles
 *
 * @package RentStack
 * @since 3.2.1
 */

/* ==========================================================================
   RENTAL WIDGET CONTAINER
   ========================================================================== */

.rentstack-rental-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rentstack-rental-widget * {
    box-sizing: border-box;
}

/* ==========================================================================
   DEPOSIT NOTICE
   ========================================================================== */

.rentstack-deposit-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #854d0e;
}

.rentstack-deposit-notice-icon {
    flex-shrink: 0;
    font-size: 18px;
}

.rentstack-deposit-notice strong {
    color: #713f12;
}

.rentstack-deposit-amount {
    font-weight: 700;
    color: #a16207;
}

/* ==========================================================================
   DATE SELECTION
   ========================================================================== */

.rentstack-date-section {
    margin-bottom: 20px;
}

.rentstack-date-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.rentstack-date-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.rentstack-date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.rentstack-date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rentstack-date-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rentstack-date-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rentstack-date-input:hover {
    border-color: #9ca3af;
}

.rentstack-date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rentstack-date-input::placeholder {
    color: #9ca3af;
}

/* Date input with value - show checkmark */
.rentstack-date-input.has-value {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ==========================================================================
   PRICING SUMMARY (appears after dates selected)
   ========================================================================== */

.rentstack-pricing-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: none; /* Hidden until dates selected */
}

.rentstack-pricing-summary.visible {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

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

.rentstack-pricing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.rentstack-pricing-dates {
    font-size: 13px;
    color: #6b7280;
}

.rentstack-pricing-duration {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    background: #e5e7eb;
    padding: 4px 10px;
    border-radius: 20px;
}

.rentstack-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #374151;
}

.rentstack-pricing-row.discount {
    color: #059669;
}

.rentstack-pricing-row.deposit {
    color: #6b7280;
    font-size: 13px;
}

.rentstack-pricing-row.deposit .rentstack-pricing-value {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rentstack-refundable-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 6px;
    border-radius: 4px;
}

.rentstack-pricing-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #e5e7eb;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

/* Urgency indicator */
.rentstack-urgency {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

.rentstack-urgency-icon {
    font-size: 16px;
}

/* ==========================================================================
   DAMAGE WAIVER OPTION
   ========================================================================== */

.rentstack-waiver-option {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rentstack-waiver-option:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rentstack-waiver-option.selected {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.rentstack-waiver-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.rentstack-waiver-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #10b981;
    cursor: pointer;
}

.rentstack-waiver-content {
    flex: 1;
}

.rentstack-waiver-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.rentstack-waiver-badge {
    font-size: 11px;
    font-weight: 600;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 4px;
}

.rentstack-waiver-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.rentstack-waiver-price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: #059669;
}

/* ==========================================================================
   STOCK DISPLAY (unified)
   ========================================================================== */

.rentstack-stock-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.rentstack-stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.rentstack-stock-indicator.low {
    background: #f59e0b;
}

.rentstack-stock-indicator.out {
    background: #ef4444;
}

.rentstack-stock-text {
    color: #374151;
}

.rentstack-stock-text strong {
    color: #111827;
}

/* ==========================================================================
   FLATPICKR CUSTOMIZATIONS
   ========================================================================== */

.flatpickr-calendar {
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
}

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

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

.flatpickr-current-month {
    font-weight: 600 !important;
}

.flatpickr-weekdays {
    background: #f9fafb !important;
}

.flatpickr-weekday {
    color: #6b7280 !important;
    font-weight: 600 !important;
}

.flatpickr-day {
    border-radius: 8px !important;
    color: #374151 !important;
}

.flatpickr-day:hover {
    background: #f3f4f6 !important;
    border-color: #f3f4f6 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

.flatpickr-day.today {
    border-color: #3b82f6 !important;
}

.flatpickr-day.today:not(.selected) {
    color: #3b82f6 !important;
}

.flatpickr-day.flatpickr-disabled {
    color: #d1d5db !important;
    background: #f9fafb !important;
    text-decoration: line-through;
}

/* Time picker styling */
.flatpickr-time {
    border-top: 1px solid #e5e7eb !important;
    margin-top: 8px !important;
    padding-top: 8px !important;
}

.flatpickr-time input {
    font-weight: 600 !important;
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */

.rentstack-loading {
    position: relative;
    pointer-events: none;
}

.rentstack-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.rentstack-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .rentstack-rental-widget {
        padding: 16px;
        border-radius: 8px;
    }

    .rentstack-date-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rentstack-date-input {
        padding: 14px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .rentstack-waiver-label {
        flex-wrap: wrap;
    }

    .rentstack-waiver-price {
        width: 100%;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #e5e7eb;
    }

    .rentstack-pricing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   HIDE DEFAULT WOOCOMMERCE STOCK (we'll show our own)
   ========================================================================== */

.rentstack-rental-widget ~ .stock,
.rentstack-rental-widget ~ p.stock {
    display: none !important;
}

/* ==========================================================================
   PHASE 2: CART & CHECKOUT ENHANCEMENTS
   ========================================================================== */

/* ==========================================================================
   CART - RENTAL ITEM DISPLAY
   ========================================================================== */

.woocommerce-cart-form__cart-item.rentstack-rental-item {
    background: #fafafa;
}

/* Force WooCommerce variation list to stack for rental details */
.woocommerce-cart dl.variation dt,
.woocommerce-cart dl.variation dd {
    display: block !important;
    float: none !important;
    width: 100% !important;
    padding: 2px 0 !important;
    margin: 0 !important;
}

.woocommerce-cart dl.variation dd p {
    margin: 0;
}

/* Style the variation list container */
.woocommerce-cart dl.variation {
    margin-top: 8px !important;
    padding: 12px !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    border-radius: 8px !important;
    font-size: 13px !important;
}

/* Style the labels (dt) */
.woocommerce-cart dl.variation dt {
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 8px !important;
}

.woocommerce-cart dl.variation dt:first-child {
    margin-top: 0 !important;
}

/* Style the values (dd) */
.woocommerce-cart dl.variation dd {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Duration badge - blue pill */
.woocommerce-cart dl.variation dd.variation-Duration p,
.woocommerce-cart dl.variation dd.variation-Duration {
    display: inline-block !important;
    width: auto !important;
    padding: 4px 12px !important;
    background: #3b82f6 !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    margin-top: 4px !important;
}

/* Protection/Waiver badge - green */
.woocommerce-cart dl.variation dd.variation-Protection p,
.woocommerce-cart dl.variation dd.variation-Protection {
    display: inline-block !important;
    width: auto !important;
    padding: 4px 10px !important;
    background: #dcfce7 !important;
    color: #166534 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    margin-top: 4px !important;
}

.rentstack-cart-rental-label {
    color: #64748b;
    min-width: 60px;
}

.rentstack-cart-rental-value {
    font-weight: 600;
    color: #0f172a;
}

.rentstack-cart-rental-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 4px 10px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

.rentstack-cart-waiver-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.rentstack-cart-waiver-badge::before {
    content: '\2713';
}

/* ==========================================================================
   CART - RENTAL SUMMARY BOX
   ========================================================================== */

.rentstack-cart-summary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rentstack-cart-summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-cart-summary-icon {
    font-size: 24px;
}

.rentstack-cart-summary-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.rentstack-cart-summary-count {
    margin-left: auto;
    padding: 4px 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
}

.rentstack-cart-summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rentstack-cart-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.rentstack-cart-summary-item-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background: #e2e8f0;
}

.rentstack-cart-summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rentstack-cart-summary-item-details {
    flex: 1;
    min-width: 0;
}

.rentstack-cart-summary-item-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rentstack-cart-summary-item-dates {
    font-size: 12px;
    color: #64748b;
}

.rentstack-cart-summary-item-price {
    flex-shrink: 0;
    font-weight: 600;
    color: #0f172a;
}

/* ==========================================================================
   CHECKOUT - FULFILLMENT METHOD CARDS
   ========================================================================== */

#rentstack-fulfillment-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

#rentstack-fulfillment-wrapper h3 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 16px 0 !important;
    border-bottom: 1px solid #e2e8f0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

.rentstack-fulfillment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rentstack-fulfillment-option {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rentstack-fulfillment-option:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.rentstack-fulfillment-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rentstack-fulfillment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rentstack-fulfillment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rentstack-fulfillment-icon {
    font-size: 24px;
}

.rentstack-fulfillment-title {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}

.rentstack-fulfillment-price {
    margin-left: auto;
    font-weight: 700;
    font-size: 14px;
}

.rentstack-fulfillment-price.free {
    color: #059669;
}

.rentstack-fulfillment-price.paid {
    color: #0f172a;
}

.rentstack-fulfillment-description {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.rentstack-fulfillment-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.rentstack-fulfillment-check::after {
    content: '\2713';
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.rentstack-fulfillment-option.selected .rentstack-fulfillment-check {
    display: flex;
}

/* ==========================================================================
   CHECKOUT - ORDER REVIEW ENHANCEMENTS
   ========================================================================== */

.woocommerce-checkout-review-order {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.woocommerce-checkout-review-order-table {
    margin-bottom: 0 !important;
}

/* Style the order table header */
.woocommerce-checkout-review-order-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.woocommerce-checkout-review-order-table thead th:first-child {
    border-radius: 8px 0 0 0;
}

.woocommerce-checkout-review-order-table thead th:last-child {
    border-radius: 0 8px 0 0;
}

/* Style the product rows */
.woocommerce-checkout-review-order-table tbody td {
    padding: 16px;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
}

.woocommerce-checkout-review-order-table .product-name {
    font-weight: 600;
    color: #0f172a;
}

/* Rental dates in checkout */
.woocommerce-checkout-review-order-table dl.variation {
    margin: 8px 0 0 0;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 12px;
}

.woocommerce-checkout-review-order-table dl.variation dt {
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 2px;
}

.woocommerce-checkout-review-order-table dl.variation dd {
    color: #0f172a;
    margin: 0 0 8px 0;
}

.woocommerce-checkout-review-order-table dl.variation dd:last-child {
    margin-bottom: 0;
}

/* Style fee rows (deposits, delivery) */
.woocommerce-checkout-review-order-table .fee th,
.woocommerce-checkout-review-order-table .fee td {
    padding: 12px 16px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.woocommerce-checkout-review-order-table .fee th {
    font-weight: 500;
    color: #92400e;
}

/* Refundable deposit styling */
.rentstack-fee-refundable {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rentstack-refundable-tag {
    display: inline-block;
    padding: 2px 6px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

/* Style totals */
.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table tfoot td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
    padding: 16px;
    background: #f8fafc;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* ==========================================================================
   CHECKOUT - PAYMENT SECTION
   ========================================================================== */

#payment {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

#payment .place-order {
    padding: 20px 0 0 0;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}

#payment #place_order {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

#payment #place_order:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

/* ==========================================================================
   CHECKOUT - RENTAL AGREEMENT NOTICE
   ========================================================================== */

.rentstack-checkout-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 10px;
}

.rentstack-checkout-notice-icon {
    flex-shrink: 0;
    font-size: 24px;
}

.rentstack-checkout-notice-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
}

.rentstack-checkout-notice-content p {
    margin: 0;
    font-size: 13px;
    color: #15803d;
    line-height: 1.5;
}

/* ==========================================================================
   CHECKOUT - SMS OPT-IN
   ========================================================================== */

.rentstack-sms-optin {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rentstack-sms-optin:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.rentstack-sms-optin.checked {
    border-color: #10b981;
    background: #f0fdf4;
}

.rentstack-sms-optin input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #10b981;
    cursor: pointer;
}

.rentstack-sms-optin-content {
    flex: 1;
}

.rentstack-sms-optin-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.rentstack-sms-optin-badge {
    padding: 2px 6px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.rentstack-sms-optin-description {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

/* ==========================================================================
   THANK YOU PAGE - RENTAL CONFIRMATION
   ========================================================================== */

.rentstack-thankyou-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.rentstack-thankyou-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-thankyou-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    font-size: 24px;
    color: #ffffff;
}

.rentstack-thankyou-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.rentstack-thankyou-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.rentstack-thankyou-schedule {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.rentstack-thankyou-date-card {
    padding: 16px;
    border-radius: 10px;
    text-align: center;
}

.rentstack-thankyou-date-card.pickup {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
}

.rentstack-thankyou-date-card.return {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
}

.rentstack-thankyou-date-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rentstack-thankyou-date-card.pickup .rentstack-thankyou-date-label {
    color: #059669;
}

.rentstack-thankyou-date-card.return .rentstack-thankyou-date-label {
    color: #dc2626;
}

.rentstack-thankyou-date-value {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.rentstack-thankyou-date-time {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.rentstack-thankyou-items {
    background: #f8fafc;
    border-radius: 8px;
    padding: 16px;
}

.rentstack-thankyou-items h4 {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.rentstack-thankyou-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-thankyou-item:last-child {
    border-bottom: none;
}

.rentstack-thankyou-item-name {
    flex: 1;
    font-weight: 500;
    color: #0f172a;
}

.rentstack-thankyou-item-qty {
    color: #64748b;
    font-size: 13px;
}

.rentstack-thankyou-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.rentstack-thankyou-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rentstack-thankyou-btn.primary {
    background: #3b82f6;
    color: #ffffff;
}

.rentstack-thankyou-btn.primary:hover {
    background: #2563eb;
}

.rentstack-thankyou-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

.rentstack-thankyou-btn.secondary:hover {
    background: #e2e8f0;
}

/* ==========================================================================
   MOBILE RESPONSIVE - CART & CHECKOUT
   ========================================================================== */

@media (max-width: 768px) {
    .rentstack-fulfillment-options {
        grid-template-columns: 1fr;
    }

    .rentstack-thankyou-schedule {
        grid-template-columns: 1fr;
    }

    .rentstack-thankyou-actions {
        flex-direction: column;
    }

    .woocommerce-checkout-review-order {
        padding: 16px;
    }

    #payment {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .rentstack-cart-rental-info {
        padding: 10px;
    }

    .rentstack-cart-summary {
        padding: 16px;
    }

    #rentstack-fulfillment-wrapper {
        padding: 16px !important;
    }

    .rentstack-fulfillment-option {
        padding: 12px;
    }

    .rentstack-thankyou-box {
        padding: 16px;
    }
}

/* ==========================================================================
   PHASE 3: CUSTOMER PORTAL
   ========================================================================== */

/* ==========================================================================
   PORTAL - BASE STYLES
   ========================================================================== */

.rentstack-portal {
    max-width: 100%;
}

.rentstack-portal h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
}

.rentstack-portal h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.rentstack-portal p {
    margin: 0;
    color: #64748b;
}

/* ==========================================================================
   PORTAL - HEADER & STATS
   ========================================================================== */

.rentstack-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-portal-welcome {
    flex: 1;
    min-width: 200px;
}

.rentstack-portal-stats {
    display: flex;
    gap: 12px;
}

.rentstack-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    min-width: 90px;
}

.rentstack-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #0369a1;
    line-height: 1;
}

.rentstack-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ==========================================================================
   PORTAL - BREADCRUMB
   ========================================================================== */

.rentstack-portal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.rentstack-portal-breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

.rentstack-portal-breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   PORTAL - ALERT BANNER
   ========================================================================== */

.rentstack-portal-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    margin-bottom: 24px;
}

.rentstack-alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.rentstack-alert-content strong {
    display: block;
    color: #92400e;
    margin-bottom: 2px;
}

.rentstack-alert-content p {
    color: #a16207;
    font-size: 14px;
}

/* ==========================================================================
   PORTAL - SECTION
   ========================================================================== */

.rentstack-portal-section {
    margin-bottom: 32px;
}

.rentstack-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.rentstack-section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.rentstack-section-icon {
    font-size: 18px;
}

.rentstack-link-view-all {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.rentstack-link-view-all:hover {
    text-decoration: underline;
}

/* ==========================================================================
   PORTAL - RENTAL CARDS GRID
   ========================================================================== */

.rentstack-rentals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.rentstack-rental-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.rentstack-rental-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.rentstack-rental-card.active {
    border-color: #22c55e;
}

.rentstack-rental-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-rental-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.rentstack-rental-status.active {
    background: #dcfce7;
    color: #166534;
}

.rentstack-rental-status.upcoming {
    background: #e0f2fe;
    color: #0369a1;
}

.rentstack-rental-status.completed {
    background: #f1f5f9;
    color: #64748b;
}

.rentstack-rental-order {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.rentstack-rental-card-body {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.rentstack-rental-items {
    flex: 1;
}

.rentstack-rental-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rentstack-rental-item-mini img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.rentstack-rental-item-mini span {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
}

.rentstack-rental-more {
    font-size: 12px;
    color: #64748b;
    margin-left: 50px;
}

.rentstack-rental-countdown {
    text-align: center;
    padding: 12px 16px;
    background: #f0f9ff;
    border-radius: 8px;
    min-width: 80px;
}

.rentstack-countdown-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rentstack-countdown-timer {
    margin-top: 4px;
}

.rentstack-countdown-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #0369a1;
    line-height: 1;
}

.rentstack-countdown-unit {
    font-size: 12px;
    color: #64748b;
}

.rentstack-countdown-timer.urgent .rentstack-countdown-value {
    color: #dc2626;
}

.rentstack-countdown-timer.overdue .rentstack-countdown-value {
    color: #dc2626;
}

.rentstack-rental-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.rentstack-rental-dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rentstack-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.rentstack-date-icon {
    font-size: 14px;
}

/* ==========================================================================
   PORTAL - BUTTONS
   ========================================================================== */

.rentstack-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.rentstack-btn-primary:hover {
    background: #2563eb;
    color: #ffffff;
}

.rentstack-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #ffffff;
    color: #1e293b;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.rentstack-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.rentstack-btn-view {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #3b82f6;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.rentstack-btn-view:hover {
    background: #2563eb;
    color: #ffffff;
}

.rentstack-btn-small {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.rentstack-btn-small:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.rentstack-btn-rent-again {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.rentstack-btn-rent-again:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

/* ==========================================================================
   PORTAL - EMPTY STATE
   ========================================================================== */

.rentstack-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

.rentstack-empty-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.rentstack-empty-state p {
    margin-bottom: 16px;
    font-size: 15px;
}

/* ==========================================================================
   PORTAL - RECENT RENTALS LIST
   ========================================================================== */

.rentstack-recent-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rentstack-recent-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
}

.rentstack-recent-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.rentstack-recent-image img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.rentstack-recent-details {
    flex: 1;
}

.rentstack-recent-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.rentstack-recent-more {
    display: inline-block;
    padding: 2px 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 6px;
}

.rentstack-recent-date {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.rentstack-no-history {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 24px;
}

/* ==========================================================================
   PORTAL - FAVORITES GRID
   ========================================================================== */

.rentstack-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.rentstack-favorite-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.rentstack-favorite-image img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}

.rentstack-favorite-info {
    flex: 1;
}

.rentstack-favorite-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.rentstack-favorite-count {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* ==========================================================================
   PORTAL - HISTORY TABLE
   ========================================================================== */

.rentstack-history-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.rentstack-history-table {
    width: 100%;
    border-collapse: collapse;
}

.rentstack-history-table th {
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    text-align: left;
}

.rentstack-history-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #1e293b;
    vertical-align: middle;
}

.rentstack-history-table tbody tr:last-child td {
    border-bottom: none;
}

.rentstack-history-table tbody tr:hover {
    background: #fafafa;
}

.rentstack-history-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.rentstack-history-more {
    display: inline-block;
    padding: 2px 6px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    margin-left: 4px;
}

.rentstack-history-actions {
    display: flex;
    gap: 8px;
}

.rentstack-status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
}

.rentstack-status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.rentstack-status-badge.upcoming {
    background: #e0f2fe;
    color: #0369a1;
}

.rentstack-status-badge.completed {
    background: #f1f5f9;
    color: #64748b;
}

/* ==========================================================================
   PORTAL - PAGINATION
   ========================================================================== */

.rentstack-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.rentstack-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.rentstack-page-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.rentstack-page-link.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* ==========================================================================
   PORTAL - SINGLE RENTAL DETAIL
   ========================================================================== */

.rentstack-rental-detail {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.rentstack-detail-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
}

.rentstack-detail-status.active {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.rentstack-detail-status.upcoming {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.rentstack-detail-status.completed {
    background: #f1f5f9;
    color: #64748b;
}

.rentstack-status-icon {
    font-size: 18px;
}

.rentstack-status-countdown {
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
}

.rentstack-detail-period {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-period-cards {
    display: flex;
    align-items: center;
    gap: 24px;
}

.rentstack-period-card {
    flex: 1;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
    text-align: center;
}

.rentstack-period-card.pickup {
    border-left: 4px solid #22c55e;
}

.rentstack-period-card.return {
    border-left: 4px solid #f59e0b;
}

.rentstack-period-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.rentstack-period-date {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.rentstack-period-time {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

.rentstack-period-arrow {
    font-size: 24px;
    color: #cbd5e1;
    flex-shrink: 0;
}

.rentstack-detail-items {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rentstack-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 10px;
}

.rentstack-item-image img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.rentstack-item-info {
    flex: 1;
}

.rentstack-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.rentstack-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.rentstack-item-waiver {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
}

.rentstack-item-qty {
    font-size: 13px;
    color: #64748b;
}

.rentstack-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    min-width: 80px;
    text-align: right;
}

.rentstack-item-actions {
    min-width: 120px;
    text-align: right;
}

.rentstack-detail-summary {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.rentstack-summary-table {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.rentstack-summary-table td {
    padding: 8px 0;
    font-size: 14px;
}

.rentstack-summary-table td:first-child {
    color: #64748b;
}

.rentstack-summary-table td:last-child {
    text-align: right;
    font-weight: 500;
    color: #1e293b;
}

.rentstack-summary-total td {
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
    font-size: 16px;
    font-weight: 700;
}

.rentstack-summary-total td:first-child {
    color: #0f172a;
}

.rentstack-refundable-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 6px;
    text-transform: uppercase;
}

.rentstack-detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: #f8fafc;
}

/* ==========================================================================
   PORTAL - RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .rentstack-portal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .rentstack-portal-stats {
        justify-content: center;
    }

    .rentstack-stat-card {
        flex: 1;
        padding: 12px 16px;
        min-width: 0;
    }

    .rentstack-stat-value {
        font-size: 20px;
    }

    .rentstack-rentals-grid {
        grid-template-columns: 1fr;
    }

    .rentstack-rental-card-body {
        flex-direction: column;
    }

    .rentstack-rental-countdown {
        order: -1;
        padding: 10px;
    }

    .rentstack-countdown-value {
        font-size: 24px;
    }

    .rentstack-period-cards {
        flex-direction: column;
        gap: 16px;
    }

    .rentstack-period-arrow {
        transform: rotate(90deg);
    }

    .rentstack-item-row {
        flex-wrap: wrap;
    }

    .rentstack-item-image {
        order: 1;
    }

    .rentstack-item-info {
        order: 2;
        flex-basis: calc(100% - 80px);
    }

    .rentstack-item-price {
        order: 3;
        min-width: 0;
        margin-left: 80px;
    }

    .rentstack-item-actions {
        order: 4;
        width: 100%;
        text-align: left;
        margin-top: 8px;
    }

    .rentstack-history-table thead {
        display: none;
    }

    .rentstack-history-table,
    .rentstack-history-table tbody,
    .rentstack-history-table tr,
    .rentstack-history-table td {
        display: block;
    }

    .rentstack-history-table tr {
        margin-bottom: 16px;
        padding: 16px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
    }

    .rentstack-history-table td {
        padding: 6px 0;
        border: none;
        text-align: left;
    }

    .rentstack-history-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #94a3b8;
        margin-bottom: 2px;
    }

    .rentstack-history-actions {
        justify-content: flex-start;
        margin-top: 8px;
    }

    .rentstack-detail-actions {
        flex-direction: column;
    }

    .rentstack-detail-actions a,
    .rentstack-detail-actions button {
        width: 100%;
        justify-content: center;
    }

    .rentstack-favorites-grid {
        grid-template-columns: 1fr;
    }

    .rentstack-recent-item {
        flex-wrap: wrap;
    }

    .rentstack-recent-actions {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .rentstack-portal-stats {
        flex-wrap: wrap;
    }

    .rentstack-stat-card {
        flex-basis: calc(50% - 6px);
    }

    .rentstack-portal-alert {
        flex-direction: column;
        text-align: center;
    }

    .rentstack-detail-period,
    .rentstack-detail-items,
    .rentstack-detail-summary {
        padding: 16px;
    }

    .rentstack-period-card {
        padding: 14px;
    }

    .rentstack-item-row {
        padding: 12px;
    }

    .rentstack-item-image img {
        width: 48px;
        height: 48px;
    }
}

/* ==========================================================================
   CLOSED DAYS STYLING (v4.1)
   ========================================================================== */

/* Visual indicator for closed days in flatpickr calendar */
.flatpickr-day.rentstack-closed-day {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(220, 38, 38, 0.1) 2px,
        rgba(220, 38, 38, 0.1) 4px
    ) !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

.flatpickr-day.rentstack-closed-day:hover {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(220, 38, 38, 0.15) 2px,
        rgba(220, 38, 38, 0.15) 4px
    ) !important;
    border-color: #fecaca !important;
}

/* Disabled state for closed days */
.flatpickr-day.rentstack-closed-day.flatpickr-disabled {
    color: #d1d5db !important;
}
