/* =========================================================================
   LAVUMALL Header - 每日簽到月曆
   建議路徑：/assets/css/header-checkin.css
   ========================================================================= */

/* Header 會員下拉中的簽到入口 */
.header-checkin-launch {
    width: 124px;
    min-height: 62px;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    background: linear-gradient(145deg, #f7fbff 0%, #eef6ff 100%);
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    flex-shrink: 0;
}

.header-checkin-launch:hover {
    transform: translateY(-2px);
    border-color: #0071e3;
    box-shadow: 0 7px 18px rgba(0, 113, 227, .12);
}

.header-checkin-launch-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #0071e3;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-checkin-launch-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-checkin-launch-copy strong {
    font-size: 12px;
    color: #1d1d1f;
    white-space: nowrap;
}

.header-checkin-launch-copy small {
    font-size: 9px;
    color: #0071e3;
    font-weight: 700;
    white-space: nowrap;
}

.header-checkin-launch-arrow {
    font-size: 9px;
    color: #8e8e93;
}

/* Overlay */
.checkin-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 22, 35, .42);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .22s ease;
}

.checkin-modal-overlay.is-open {
    display: flex;
    opacity: 1;
}

.checkin-modal-card {
    width: min(520px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow-y: auto;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.72);
    box-shadow: 0 28px 80px rgba(0,0,0,.22);
    transform: translateY(16px) scale(.98);
    transition: transform .22s ease;
}

.checkin-modal-overlay.is-open .checkin-modal-card {
    transform: translateY(0) scale(1);
}

.checkin-modal-top {
    padding: 24px 24px 19px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #0071e3 0%, #42a5f5 100%);
    color: #fff;
}

.checkin-modal-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    opacity: .76;
    margin-bottom: 6px;
}

.checkin-modal-top h3 {
    font-size: 25px;
    line-height: 1.15;
    margin: 0 0 6px;
}

.checkin-modal-top p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    opacity: .88;
}

.checkin-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.17);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkin-month-strip {
    padding: 18px 22px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkin-month-title {
    font-size: 18px;
    font-weight: 800;
    color: #1d1d1f;
}

.checkin-month-count {
    font-size: 12px;
    color: #86868b;
    background: #f5f5f7;
    padding: 6px 10px;
    border-radius: 999px;
}

.checkin-month-count strong {
    color: #0071e3;
}

.checkin-week-head,
.checkin-calendar-grid {
    margin-left: 22px;
    margin-right: 22px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.checkin-week-head {
    padding: 0 0 8px;
    color: #8e8e93;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.checkin-calendar-grid {
    gap: 7px;
    min-height: 285px;
}

.checkin-calendar-loading {
    grid-column: 1 / -1;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #86868b;
    font-size: 13px;
}

.checkin-day {
    aspect-ratio: 1 / 1;
    min-width: 0;
    border: 1px solid #ececf0;
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #3a3a3c;
    position: relative;
    font-size: 13px;
    font-weight: 700;
}

.checkin-day.is-empty {
    border-color: transparent;
    background: transparent;
}

.checkin-day.is-future {
    color: #c7c7cc;
    background: #fafafa;
}

.checkin-day.is-today {
    border: 2px solid #0071e3;
    box-shadow: 0 4px 12px rgba(0,113,227,.10);
}

.checkin-day.is-checked {
    color: #136b2d;
    background: #edf9f0;
    border-color: #bfe8c9;
}

.checkin-day.is-checked::after {
    content: "✓";
    position: absolute;
    right: 6px;
    top: 4px;
    font-size: 10px;
    color: #34c759;
}

.checkin-day-number {
    line-height: 1;
}

.checkin-day-reward {
    font-size: 8px;
    color: #0071e3;
    font-weight: 800;
}

.checkin-day.is-checked .checkin-day-reward {
    color: #34a853;
}

.checkin-modal-bottom {
    margin-top: 18px;
    padding: 16px 22px 22px;
    border-top: 1px solid #f0f0f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.checkin-today-message {
    font-size: 12px;
    color: #86868b;
    line-height: 1.45;
}

.checkin-today-btn {
    border: 0;
    border-radius: 13px;
    background: #0071e3;
    color: #fff;
    min-width: 132px;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background .2s ease, transform .2s ease;
}

.checkin-today-btn:hover:not(:disabled) {
    background: #005bb5;
    transform: translateY(-1px);
}

.checkin-today-btn:disabled {
    cursor: default;
    background: #d2d2d7;
    color: #fff;
}

@media (max-width: 560px) {
    .checkin-modal-overlay { padding: 10px; }
    .checkin-modal-card { border-radius: 20px; }
    .checkin-modal-top { padding: 20px 18px 16px; }
    .checkin-week-head,
    .checkin-calendar-grid { margin-left: 14px; margin-right: 14px; }
    .checkin-calendar-grid { gap: 5px; }
    .checkin-day { border-radius: 9px; }
    .checkin-modal-bottom {
        flex-direction: column;
        align-items: stretch;
    }
    .checkin-today-btn { width: 100%; }
}