/* ==========================================================================
   wp-RentDesk – Modern Equipment Rental Calendar Styles
   ========================================================================== */

.rentdesk-container {
    max-width: 1080px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 24px;
    box-sizing: border-box;
}

.rentdesk-container * {
    box-sizing: border-box;
}

/* Header & Item Switcher */
.rentdesk-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
}

.rentdesk-item-selector-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 280px;
}

.rentdesk-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rentdesk-container .rentdesk-select,
.rentdesk-container .rentdesk-input,
.rentdesk-container .rentdesk-textarea,
.rentdesk-container input[type="text"],
.rentdesk-container input[type="email"],
.rentdesk-container input[type="tel"],
.rentdesk-container input[type="date"],
.rentdesk-container select,
.rentdesk-container textarea {
    width: 100% !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
    outline: none !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 44px !important;
}

.rentdesk-container textarea.rentdesk-textarea,
.rentdesk-container textarea {
    min-height: 80px !important;
    resize: vertical !important;
}

.rentdesk-container .rentdesk-select:focus,
.rentdesk-container .rentdesk-input:focus,
.rentdesk-container .rentdesk-textarea:focus,
.rentdesk-container input[type="text"]:focus,
.rentdesk-container input[type="email"]:focus,
.rentdesk-container input[type="tel"]:focus,
.rentdesk-container input[type="date"]:focus,
.rentdesk-container select:focus,
.rentdesk-container textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    background-color: #ffffff !important;
}

.rentdesk-container input::placeholder,
.rentdesk-container textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Legend */
.rentdesk-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #64748b;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-dot.status-free { background: #10b981; }
.legend-dot.status-split { background: linear-gradient(135deg, #f87171 50%, #34d399 50%); }
.legend-dot.status-partial { background: #f59e0b; }
.legend-dot.status-full { background: #ef4444; }

/* Grid Layout */
.rentdesk-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
}

@media (max-width: 840px) {
    .rentdesk-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .rentdesk-container {
        padding: 16px 12px;
        margin: 12px auto;
        border-radius: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .rentdesk-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .rentdesk-item-selector-wrap {
        width: 100%;
        min-width: 0;
    }

    .rentdesk-legend {
        flex-wrap: wrap;
        gap: 8px 14px;
        justify-content: flex-start;
    }

    .rentdesk-calendar-box {
        padding: 12px 8px;
    }

    .rentdesk-weekdays,
    .rentdesk-days-grid {
        gap: 4px;
    }

    .rentdesk-day {
        min-height: 40px;
        border-radius: 6px;
    }

    .day-num {
        font-size: 13px;
    }

    .day-badge {
        font-size: 8.5px;
    }

    .rentdesk-form-box {
        width: 100%;
        min-width: 0;
    }

    .rentdesk-form {
        width: 100%;
        min-width: 0;
    }

    .rentdesk-form-row {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .rentdesk-form-group {
        width: 100% !important;
        min-width: 0 !important;
    }

    .rentdesk-form-group input,
    .rentdesk-form-group select,
    .rentdesk-form-group textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .rentdesk-stepper {
        flex-wrap: wrap;
        gap: 8px;
    }

    .rentdesk-stepper-btn {
        width: 38px;
        height: 38px;
    }

    .rentdesk-stepper-input {
        width: 60px;
        height: 38px;
    }

    .rentdesk-btn-block {
        width: 100% !important;
    }
}

/* Calendar Card */
.rentdesk-calendar-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.rentdesk-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rentdesk-month-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.rentdesk-btn-nav {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    transition: all 0.15s ease;
}

.rentdesk-btn-nav:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Weekday Labels */
.rentdesk-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Days Grid */
.rentdesk-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.rentdesk-day {
    aspect-ratio: 1 / 1;
    min-height: 48px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    user-select: none;
    background: #ffffff;
}

.rentdesk-day.day-empty {
    visibility: hidden;
    cursor: default;
    border: none;
}

.rentdesk-day.day-past {
    cursor: not-allowed;
    opacity: 0.55;
}

.rentdesk-day:hover:not(.day-past):not(.day-empty) {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 5;
}

/* Dual Interactive Slot Triangles */
.day-slot {
    position: absolute;
    inset: 0;
    transition: background-color 0.15s ease, filter 0.15s ease;
    z-index: 1;
    cursor: pointer;
}

.day-slot.slot-morning {
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.day-slot.slot-afternoon {
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

/* Individual Slot Status Colors */
.day-slot.status-free {
    background-color: #ecfdf5;
}

.day-slot.status-partial {
    background-color: #fffbeb;
}

.day-slot.status-full {
    background-color: #fef2f2;
    cursor: not-allowed;
}

.rentdesk-day.day-past .day-slot {
    background-color: #f1f5f9;
    cursor: not-allowed;
}

/* Interactive Half-Day Hover Glow */
.rentdesk-day:not(.day-past) .day-slot.status-free:hover:not(.status-full) {
    background-color: #bbf7d0 !important;
    filter: brightness(0.96);
}

.rentdesk-day:not(.day-past) .day-slot.status-partial:hover:not(.status-full) {
    background-color: #fef08a !important;
    filter: brightness(0.96);
}

.rentdesk-day:not(.day-past) .day-slot.status-full:hover {
    background-color: #fecaca !important;
}

/* Diagonal Dividing Line (Runs from bottom-left to top-right matching the triangles) */
.day-slot-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 142%;
    height: 1px;
    background: rgba(148, 163, 184, 0.5);
    transform-origin: bottom left;
    transform: rotate(-45deg);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* When a half day is booked/different, show divider in the subtle look */
.rentdesk-day.is-split .day-slot-divider {
    opacity: 0.6;
    background: rgba(148, 163, 184, 0.5);
}

/* On hover over any active day, show divider softly */
.rentdesk-day:hover:not(.day-past):not(.day-empty) .day-slot-divider {
    opacity: 0.6;
}

/* Day Center Content Overlay */
.day-content {
    position: relative;
    z-index: 3;
    pointer-events: none;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.day-num {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}

.day-badge {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    color: #475569;
    white-space: nowrap;
}

/* Active Selection & Range Shading */
.day-slot.slot-selected-endpoint {
    background-color: #2563eb !important;
}

.day-slot.slot-in-range {
    background-color: #bfdbfe !important;
}

/* Hover Preview Shading */
.day-slot.slot-preview-start {
    background-color: #2563eb !important;
}

.day-slot.slot-preview-end {
    background-color: #60a5fa !important;
}

.day-slot.slot-preview-in-range {
    background-color: #dbeafe !important;
}

.rentdesk-day.is-active-selection {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3) !important;
}

.rentdesk-day.day-past .day-num,
.rentdesk-day.day-past .day-badge {
    color: #94a3b8;
}

.rentdesk-day.day-range-preview {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
    border-radius: 0 !important;
}

.rentdesk-day.day-range-preview-start {
    background: #3b82f6 !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.rentdesk-day.day-range-preview-end {
    background: #3b82f6 !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.rentdesk-day.day-selected .day-badge,
.rentdesk-day.day-range-start .day-badge,
.rentdesk-day.day-range-end .day-badge,
.rentdesk-day.day-range-preview-start .day-badge,
.rentdesk-day.day-range-preview-end .day-badge {
    color: #e0f2fe !important;
}

/* Day Detail Info Box */
.rentdesk-day-details {
    margin-top: 14px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
}

/* Form Area */
.rentdesk-form-box {
    display: flex;
    flex-direction: column;
}

/* Clean Studio Stage for Item Image (v1.7.2) */
.rentdesk-item-image-banner {
    position: relative;
    width: 100%;
    height: 160px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle at center, #ffffff 45%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rentdesk-item-image-banner.is-zoomable {
    cursor: pointer;
}

.rentdesk-item-image-banner.is-zoomable:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.rentdesk-item-image-banner:not(.is-zoomable) {
    cursor: default;
}

/* Very subtle ambient backdrop aura (no dark edges, seamless with white images) */
.rentdesk-item-backdrop {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    opacity: 0.12;
    filter: blur(28px) saturate(1.3) brightness(1.1);
    transform: scale(1.15);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.rentdesk-item-image-banner.is-zoomable:hover .rentdesk-item-backdrop {
    opacity: 0.2;
    transform: scale(1.22);
}

.rentdesk-item-hero-img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rentdesk-item-image-banner.is-zoomable:hover .rentdesk-item-hero-img {
    transform: scale(1.04);
}

/* Floating clean zoom hint badge */
.rentdesk-image-zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: #475569;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.rentdesk-item-image-banner.is-zoomable:hover .rentdesk-image-zoom-hint {
    opacity: 1;
    transform: scale(1.08);
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.rentdesk-image-zoom-hint .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    line-height: 15px;
}

.rentdesk-form-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.rentdesk-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rentdesk-form-row {
    display: flex;
    gap: 12px;
}

.rentdesk-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.rentdesk-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

/* Buttons */
.rentdesk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.rentdesk-btn-primary {
    background: #2563eb;
    color: #ffffff !important;
}

.rentdesk-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.rentdesk-btn-block {
    width: 100%;
}

/* Alerts */
.rentdesk-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 14px;
}

.rentdesk-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.rentdesk-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Member Notice */
.rentdesk-member-notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    margin: 30px auto;
}

.rentdesk-notice-icon {
    color: #2563eb;
    background: #eff6ff;
    padding: 10px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rentdesk-notice-content h4 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #0f172a;
}

.rentdesk-notice-content p {
    margin: 0 0 14px;
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

/* Empty State Notice */
.rentdesk-notice {
    max-width: 650px;
    margin: 24px auto;
    padding: 20px 24px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.rentdesk-notice-empty {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

.rentdesk-notice-empty .rentdesk-notice-icon {
    color: #0284c7;
    background: #e0f2fe;
}

.rentdesk-notice-empty strong {
    font-size: 15px;
    color: #0c4a6e;
}

.rentdesk-notice-action {
    display: inline-block;
    margin-top: 10px;
    background: #0284c7;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease;
}

.rentdesk-notice-action:hover {
    background: #0369a1;
}

/* Admin Draft Preview Banner */
.rentdesk-admin-preview-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.rentdesk-admin-preview-banner strong {
    color: #78350f;
}

/* Quantity Stepper & Picker */
.rentdesk-quantity-wrap {
    margin-bottom: 16px;
}

.rentdesk-qty-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.rentdesk-qty-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.rentdesk-qty-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

.rentdesk-qty-btn:active {
    background: #cbd5e1;
    transform: scale(0.96);
}

.rentdesk-container .rentdesk-quantity-input {
    width: 76px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 8px 4px !important;
    -moz-appearance: textfield;
}

.rentdesk-container .rentdesk-quantity-input::-webkit-outer-spin-button,
.rentdesk-container .rentdesk-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.rentdesk-qty-max-hint {
    font-size: 13px;
    color: #64748b;
    margin-left: 6px;
}

/* Lightbox Modal */
.rentdesk-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    animation: rentdeskFadeIn 0.2s ease;
}

.rentdesk-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

.rentdesk-lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: rentdeskZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.rentdesk-lightbox-img {
    max-width: 85vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #0f172a;
}

.rentdesk-lightbox-caption {
    margin-top: 12px;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.rentdesk-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    background: #1e293b;
    border: 2px solid #ffffff;
    color: #ffffff;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, background 0.15s ease;
}

.rentdesk-lightbox-close:hover {
    background: #dc2626;
    transform: scale(1.1);
}

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

@keyframes rentdeskZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}


