/* ============================================
   Custom Date + Time Picker (dtp)
   ============================================ */

.dtp-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    text-transform: capitalize;
}

/* The split field container */
.dtp-field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    background: #fff;
    overflow: visible;
    cursor: pointer;
    transition: border-color 0.2s;
}
.dtp-field:hover {
    border-color: #bbb;
}

/* Date part (left) */
.dtp-date-part {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    border-radius: 10px 0 0 10px;
    transition: background 0.15s;
}
.dtp-date-part:hover {
    background: #f5f5f5;
}
.dtp-date-part i {
    font-size: 16px;
    color: #444;
}

/* Vertical divider */
.dtp-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    flex-shrink: 0;
}

/* Time part (right) */
.dtp-time-part {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    transition: background 0.15s;
}
.dtp-time-part:hover {
    background: #f5f5f5;
}

/* ============================================
   Portal Dropdowns (appended to body)
   ============================================ */
.dtp-dropdown-portal {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
    pointer-events: none;
    max-width: calc(100vw - 20px);
}
.dtp-dropdown-portal.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0s;
}
.dtp-dropdown-portal--date {
    padding: 16px;
}

/* ============================================
   Time Dropdown
   ============================================ */
.dtp-dropdown-header {
    padding: 14px 16px 6px;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-align: center;
}

.dtp-dropdown-note {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 10px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}
.dtp-dropdown-note i {
    font-size: 14px;
}

.dtp-dropdown-scroll {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 12px 12px;
}

/* Scrollbar styling */
.dtp-dropdown-scroll::-webkit-scrollbar {
    width: 6px;
}
.dtp-dropdown-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.dtp-dropdown-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

/* Time group labels */
.dtp-time-group-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    padding: 10px 4px 6px;
}
.dtp-time-group-label:first-child {
    padding-top: 4px;
}

/* Time grid — 2 columns */
.dtp-time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 4px;
}

/* Time buttons */
.dtp-time-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    background: #f4f4f5;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.dtp-time-btn:hover {
    background: #e8e8ea;
}
.dtp-time-btn.active {
    background: #222;
    color: #fff;
}
.dtp-time-btn.disabled {
    color: #ccc;
    background: #fafafa;
    cursor: not-allowed;
}
.dtp-time-btn.disabled:hover {
    background: #fafafa;
}

/* ============================================
   Date / Calendar Dropdown
   ============================================ */

/* Calendar header with month title and nav arrows */
.dtp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dtp-cal-title {
    font-size: 15px;
    font-weight: 700;
    color: #222;
}
.dtp-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f4f4f5;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.dtp-cal-nav:hover {
    background: #e8e8ea;
}

/* Weekday headers */
.dtp-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    margin-bottom: 6px;
}
.dtp-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    padding: 4px 0;
    text-transform: uppercase;
}

/* Day grid */
.dtp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* Day cells */
.dtp-cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #222;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.dtp-cal-day:hover:not(.dtp-cal-disabled):not(.dtp-cal-empty):not(.dtp-cal-selected) {
    background: #f0f0f0;
}
.dtp-cal-empty {
    cursor: default;
}
.dtp-cal-disabled {
    color: #ccc;
    cursor: not-allowed;
}
.dtp-cal-today {
    background: #f4f4f5;
    font-weight: 700;
}
.dtp-cal-selected {
    background: #222;
    color: #fff;
    font-weight: 700;
}

/* ============================================
   Inline variant (for hero/rent-details form)
   No outer border — fits inside .rent-details-content
   ============================================ */
.dtp-field--inline {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
}
.dtp-field--inline:hover {
    border-color: transparent;
}
.dtp-field--inline .dtp-date-part {
    padding: 8px 0;
    font-size: 16px;
    gap: 0;
    color: var(--text-color, #555);
}
.dtp-field--inline .dtp-date-part:hover {
    background: transparent;
}
.dtp-field--inline .dtp-divider {
    height: 18px;
    margin: 0 10px;
    background: var(--divider-color, #ddd);
}
.dtp-field--inline .dtp-time-part {
    padding: 8px 0;
    font-size: 16px;
    border-radius: 0;
    color: var(--text-color, #555);
}
.dtp-field--inline .dtp-time-part:hover {
    background: transparent;
    opacity: 0.7;
}

/* Inline variant — no dropdown overrides needed (portals handle positioning) */

/* ============================================
   Custom Select Dropdown (location pickers)
   Matches dtp-picker design language
   ============================================ */
.custom-select-field {
    position: relative;
    cursor: pointer;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 8px;
}

.custom-select-value {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-color, #555);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-value.has-value {
    font-weight: 500;
    color: var(--primary-color, #222);
}

.custom-select-arrow {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.custom-select-field.open .custom-select-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel — uses portal (appended to body via JS) */
.custom-select-portal {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
    pointer-events: none;
    min-width: 240px;
    max-height: 320px;
}

.custom-select-portal.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0s;
}

.custom-select-portal-header {
    padding: 12px 16px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
}

.custom-select-portal-scroll {
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 8px;
}

.custom-select-portal-scroll::-webkit-scrollbar {
    width: 6px;
}
.custom-select-portal-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-portal-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.custom-select-opt {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s;
}
.custom-select-opt:hover {
    background: #f4f4f5;
}
.custom-select-opt.active {
    background: #222;
    color: #fff;
}
.custom-select-group-header {
    padding: 10px 16px 6px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #333;
    background: #f4f4f5;
    border-top: 2px solid #e0e0e0;
    margin-top: 6px;
    pointer-events: none;
}
.custom-select-group-header:first-child {
    border-top: none;
    margin-top: 0;
    border-radius: 8px 8px 0 0;
}
