/* BYSDO Custom Minimalist Datepicker (Matching Wensity / 21st.dev Specification) */
.bysdo-dp-popup {
    position: fixed;
    z-index: 99999999;
    width: 330px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 1.35rem 1.25rem 1.15rem;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.bysdo-dp-popup.dp-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Header */
.bysdo-dp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.bysdo-dp-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s ease;
    padding: 0;
}

.bysdo-dp-nav-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.bysdo-dp-title-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bysdo-dp-separator {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 300;
    margin: 0 4px;
    user-select: none;
}

.bysdo-dp-title-btn {
    background: none;
    border: 1.5px solid transparent;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.bysdo-dp-title-btn:hover {
    background: #f8fafc;
    color: #059669;
}

.bysdo-dp-title-btn.dp-title-active {
    border-color: #cbd5e1 !important;
    background: #f8fafc;
    color: #0f172a;
}

/* Sub-header for Decade Navigation (< 2021 - 2032 >) */
.bysdo-dp-sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.5rem 0.75rem;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
}

.bysdo-dp-sub-title {
    font-weight: 700;
    color: #475569;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
}

.bysdo-dp-sub-nav-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
}

.bysdo-dp-sub-nav-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Weekday Row */
.bysdo-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.55rem;
}

/* Days Grid */
.bysdo-dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.bysdo-dp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 500;
    color: #1e293b;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.bysdo-dp-day:hover:not(.dp-selected) {
    background: #f1f5f9;
    color: #0f172a;
}

.bysdo-dp-day.dp-other-month {
    color: #cbd5e1;
    font-weight: 400;
}

.bysdo-dp-day.dp-other-month:hover {
    color: #94a3b8;
    background: #f8fafc;
}

.bysdo-dp-day.dp-today:not(.dp-selected)::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #059669;
}

.bysdo-dp-day.dp-selected {
    background: #0f172a !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
}

/* Months & Years View (3x4 Grid) */
.bysdo-dp-grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0.35rem 0;
}

.bysdo-dp-grid-item {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bysdo-dp-grid-item:hover:not(.dp-selected) {
    background: #f1f5f9;
    color: #0f172a;
}

.bysdo-dp-grid-item.dp-selected {
    background: #94a3b8 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(100, 116, 139, 0.25);
}

/* Time Picker Section (for datetime-local) */
.bysdo-dp-time-bar {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
}

.bysdo-dp-time-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
}

.bysdo-dp-time-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    height: 32px;
    padding: 0 3px 0 6px;
    transition: all 0.15s ease;
}

.bysdo-dp-time-box:focus-within {
    border-color: #059669;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.bysdo-dp-time-input {
    width: 24px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    padding: 0;
    outline: none;
    -moz-appearance: textfield;
}

.bysdo-dp-time-input::-webkit-inner-spin-button,
.bysdo-dp-time-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bysdo-dp-spinners {
    display: flex;
    flex-direction: column;
    margin-left: 2px;
}

.bysdo-dp-spin-btn {
    width: 16px;
    height: 13px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 2px;
    transition: all 0.12s ease;
}

.bysdo-dp-spin-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.bysdo-dp-time-colon {
    font-weight: 800;
    color: #64748b;
    font-size: 0.95rem;
    user-select: none;
}

.bysdo-dp-ampm-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 8px;
    height: 32px;
    padding: 0 9px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.bysdo-dp-ampm-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.bysdo-dp-done-btn {
    margin-left: auto;
    background: #059669;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
    transition: background 0.15s ease, transform 0.1s ease;
}

.bysdo-dp-done-btn:hover {
    background: #047857;
}

.bysdo-dp-done-btn:active {
    transform: scale(0.97);
}

/* Suppress default browser datepicker dropdown and icons */
input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-inner-spin-button,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
}

/* Custom Calendar Icon on Date Inputs */
input[type="date"],
input[type="datetime-local"],
input.bysdo-datepicker {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' x2='16' y1='2' y2='6'%3E%3C/line%3E%3Cline x1='8' x2='8' y1='2' y2='6'%3E%3C/line%3E%3Cline x1='3' x2='21' y1='10' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 17px 17px !important;
    padding-right: 2.5rem !important;
    cursor: pointer !important;
}