/* ── Custom date/month picker (bp-picker) — warm pink theme ──
 * Self-contained calendar component. No external dependencies.
 * JS in assets/js/bp-picker.js
 */

/* Date inputs with picker */
input[data-bp-mode] { padding-right: 2.4rem; }

.bp-picker-popover {
    position: fixed; z-index: 10020; width: 268px; background: white;
    border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.12);
    overflow: hidden;  /* clips content to border-radius */
    font-family: 'Quicksand','Noto Sans SC', sans-serif;
    animation: bpPickerFadeIn 0.15s ease;
}
.bp-picker-header {
    height: 48px; padding: 0 8px; background: #fff5f5;
    display: grid; grid-template-columns: 32px minmax(0,1fr) 32px;
    align-items: center; gap: 5px;
}
.bp-picker-nav, .bp-picker-title {
    appearance: none; border: none; background: transparent;
    font-family: inherit; cursor: pointer;
    transition: background .16s, color .16s, transform .16s;
}
.bp-picker-nav {
    width: 32px; height: 32px; border-radius: 10px;
    color: var(--accent-pink);
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.bp-picker-nav svg {
    width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2;
    stroke-linecap: round; stroke-linejoin: round; fill: none;
}
.bp-picker-title {
    min-width: 0; height: 32px; border-radius: 9px;
    color: var(--text-main); font-size: 1rem; font-weight: 600; padding: 0 8px;
}
.bp-picker-nav:hover, .bp-picker-title:hover {
    background: rgba(255,255,255,.72); color: #e88f8a;
}
.bp-picker-nav:active, .bp-picker-title:active { transform: scale(.96); }
/* Month & Year grid: 3×4 */
.bp-picker-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 6px; padding: 8px;
}
/* Day grid: 7 columns */
.bp-picker-grid.bp-day-grid {
    grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2px;
}
/* Weekday header */
.bp-picker-weekday {
    font-size: .75rem; font-weight: 500; color: var(--accent-pink);
    text-align: center; padding: .4rem 0; user-select: none;
}
/* Shared cell style: month, year, day */
.bp-picker-cell {
    appearance: none; border: 1px solid transparent; background: transparent;
    border-radius: 10px; color: var(--text-main); cursor: pointer;
    font-family: inherit; font-size: .86rem; font-weight: 500;
    padding: .72rem .25rem; text-align: center;
    transition: background .15s, color .15s;
}
.bp-picker-cell:hover, .bp-picker-cell:focus { background: #fff0ef; outline: none; }
.bp-picker-cell.today { border: 1px solid var(--accent-pink); }
.bp-picker-cell.selected,
.bp-picker-cell.selected:hover,
.bp-picker-cell.selected:focus {
    background: var(--accent-pink); border-color: var(--accent-pink); color: white;
}
.bp-picker-cell.other-month { color: #ccc; }
/* 无数据（如筛选时没有照片的月/年）：变灰、不可选 */
.bp-picker-cell.bp-disabled { opacity: 0.3; cursor: not-allowed; }
.bp-picker-cell.bp-disabled:hover,
.bp-picker-cell.bp-disabled:focus { background: transparent; }
/* Day cells: compact */
.bp-day-grid .bp-picker-cell {
    padding: .45rem .1rem; font-size: .82rem; border-radius: 8px;
}
@keyframes bpPickerFadeIn {
    from { opacity: 0; transform: scale(.97); }
    to   { opacity: 1; transform: scale(1); }
}
/* Date input wrapper + toggle button */
.date-input-wrap {
    position: relative;
}
.bp-picker-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    border: none; background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    padding: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffb7b2'%3E%3Cpath fill-rule='evenodd' d='M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 1.1rem;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
}
.bp-picker-toggle:hover { background-color: #fff0ef; opacity: 1; }

/* 移动端：日期输入字号≥16px，避免 iOS 聚焦时整页放大（日历点图标弹出，不靠键盘输入）*/
@media (max-width: 600px) {
    .date-input-wrap input { font-size: 16px; }
}
