/* ──── WPC Delivery Date & Time Slots — Frontend Styles ────── */

.wpcdt-picker-wrapper {
    margin: 20px 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    font-family: -apple-system, 'Helvetica Neue', sans-serif;
}

/* ── Section heading ── */
.wpcdt-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpcdt-section-title svg {
    width: 20px;
    height: 20px;
    color: #6366f1;
}

/* ── Calendar ── */
.wpcdt-calendar {
    width: 100%;
    user-select: none;
}

.wpcdt-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wpcdt-cal-nav {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 16px;
    color: #64748b;
    padding: 0;
}

.wpcdt-cal-nav:hover {
    background: #f1f5f9;
    border-color: #6366f1;
    color: #6366f1;
}

.wpcdt-cal-month-year {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
}

.wpcdt-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.wpcdt-cal-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.wpcdt-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.wpcdt-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    color: #1e293b;
    position: relative;
}

.wpcdt-cal-day.empty {
    cursor: default;
}

.wpcdt-cal-day.unavailable {
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.wpcdt-cal-day.available:hover {
    background: #eef2ff;
    color: #6366f1;
}

.wpcdt-cal-day.selected {
    background: #6366f1;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(99, 102, 241, .35);
}

.wpcdt-cal-day.today:not(.selected)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6366f1;
}

/* ── Slots ── */
.wpcdt-slots-wrapper {
    margin-top: 24px;
}

.wpcdt-slots-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
}

.wpcdt-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.wpcdt-slot-btn {
    padding: 14px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.wpcdt-slot-btn:hover:not(.wpcdt-slot-full) {
    border-color: #6366f1;
    background: #eef2ff;
}

.wpcdt-slot-btn.selected {
    border-color: #6366f1;
    background: #6366f1;
    color: #fff;
}

.wpcdt-slot-btn.wpcdt-slot-full {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.wpcdt-slot-name {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.wpcdt-slot-time {
    font-size: 12px;
    color: #64748b;
    display: block;
}

.wpcdt-slot-btn.selected .wpcdt-slot-time {
    color: rgba(255, 255, 255, .8);
}

.wpcdt-slot-fee {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.wpcdt-slot-btn.selected .wpcdt-slot-fee {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.wpcdt-slot-full-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #ef4444;
    display: block;
    margin-top: 4px;
}

/* ── Slots loading state ── */
.wpcdt-slots-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    padding: 12px 0;
}

.wpcdt-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: wpcdt-spin .6s linear infinite;
}

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

/* ── Selected summary ── */
.wpcdt-selection-summary {
    margin-top: 18px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    font-size: 13px;
    color: #065f46;
    display: none;
}

.wpcdt-selection-summary.visible {
    display: block;
}

.wpcdt-selection-summary strong {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.wpcdt-selection-summary span {
    display: block;
    font-size: 12.5px;
}

.wpcdt-slot-required-notice {
    color: #d97706;
}

.wpcdt-no-slots-message {
    color: #94a3b8;
    font-size: 13px;
    margin: 4px 0;
    grid-column: 1 / -1;
}

/* ── Slot Dropdown style ── */
.wpcdt-slot-select {
    width: 100%;
    grid-column: 1 / -1;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background-color: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.wpcdt-slot-select:focus {
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

/* ── Countdown banner ── */
.wpcdt-countdown-banner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #334155;
}

.wpcdt-countdown-time {
    display: inline;
    font-weight: 700;
    font-size: inherit;
    color: inherit;
}

/* ── Error state ── */
.wpcdt-error-notice {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.wpcdt-error-notice.visible {
    display: block;
}

/* ──── My Account: Reschedule portal ─────────────────────────── */
.wpcdt-reschedule-page {
    max-width: 720px;
}

.wpcdt-reschedule-intro {
    color: #475569;
    font-size: 14px;
    margin-bottom: 24px;
}

.wpcdt-reschedule-empty {
    text-align: center;
    padding: 40px;
    background: #f8fafc;
    border-radius: 12px;
    color: #94a3b8;
}

/* Orders table */
.wpcdt-reschedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wpcdt-reschedule-table th {
    text-align: left;
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
}

.wpcdt-reschedule-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.wpcdt-count-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
}

.wpcdt-count-badge.wpcdt-count-full {
    background: #fee2e2;
    color: #b91c1c;
}

.wpcdt-reschedule-na {
    font-size: 12px;
    color: #94a3b8;
    cursor: help;
    border-bottom: 1px dashed #cbd5e1;
}

.wpcdt-reschedule-btn {
    background: #6366f1 !important;
    color: #fff !important;
    border-color: #6366f1 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    height: auto !important;
    line-height: 1.4 !important;
    transition: all .2s !important;
}

.wpcdt-reschedule-btn:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    transform: translateY(-1px) !important;
}

/* Reschedule form page */
.wpcdt-reschedule-nav {
    margin-bottom: 20px;
}

.wpcdt-reschedule-nav a {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.wpcdt-reschedule-nav a:hover {
    text-decoration: underline;
}

.wpcdt-order-summary {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 24px;
    font-size: 14px;
}

.wpcdt-order-summary h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.wpcdt-reschedule-count {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0;
}

.wpcdt-reschedule-disabled {
    color: #ef4444;
    font-size: 13px;
}

/* Confirm row */
.wpcdt-reschedule-confirm-row {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpcdt-reschedule-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: wpcdt-spin .6s linear infinite;
}

/* Result message */
.wpcdt-reschedule-result {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.wpcdt-result-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block !important;
}

.wpcdt-result-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    display: block !important;
}

/* Order detail page reschedule section */
.wpcdt-reschedule-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* Admin: checkbox group for statuses */
.wpcdt-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpcdt-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    transition: all .15s;
}

.wpcdt-checkbox-item:hover {
    border-color: #6366f1;
    background: #eef2ff;
}

.wpcdt-checkbox-item input {
    margin: 0;
}

/* Admin: "Off by default" badge */
.wpcdt-badge-off {
    display: inline-block;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
}

