/* css/hunter/mobile-base-actions.css */

/* =========================
   Base check-in visibility fix
   - previous compact base layout hid .hunter-base-card-action globally
   - sign-in is a core base action, keep it visible only on the check-in card
========================= */
@media (max-width: 768px) {
    .hunter-page .hunter-base-quick-card-checkin {
        position: relative;
    }

    .hunter-page .hunter-base-quick-card-checkin .hunter-base-card-action {
        position: absolute;
        right: 8px;
        bottom: 8px;
        z-index: 3;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: auto;
        min-width: 72px;
        height: 26px;
        padding: 0 9px;
        border-radius: 999px;

        font-size: 10px;
        line-height: 1;
        white-space: nowrap;
    }

    .hunter-page .hunter-base-quick-card-checkin .hunter-checkin-status-tag {
        max-width: calc(100% - 82px);
    }
}

@media (max-width: 420px) {
    .hunter-page .hunter-base-quick-card-checkin .hunter-base-card-action {
        right: 7px;
        bottom: 7px;
        min-width: 64px;
        height: 24px;
        padding: 0 8px;
        font-size: 9px;
    }

    .hunter-page .hunter-base-quick-card-checkin .hunter-checkin-status-tag {
        max-width: calc(100% - 72px);
    }
}




/* =========================
   Base rank shortcut removal
   - rank tab now owns the full guild exam page
   - keep base focused on sign-in, daily tasks, and hunter log
========================= */
@media (max-width: 768px) {
    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="log"] {
        grid-column: 1 / -1;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="log"] .hunter-base-quick-main {
        align-items: center;
    }
}


/* =========================
   Base dashboard 3-card layout
   - after removing rank card, keep sign-in visible on mobile
========================= */
@media (max-width: 768px) {
    .hunter-page .hunter-base-dashboard.is-rank-removed {
        grid-template-areas:
            "checkin daily"
            "log log";
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="checkin"] {
        grid-area: checkin;
        display: grid !important;
        visibility: visible !important;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="daily"] {
        grid-area: daily;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="log"] {
        grid-area: log;
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .hunter-page .hunter-base-dashboard.is-rank-removed {
        grid-template-areas:
            "checkin daily"
            "log log";
    }
}


/* =========================
   Base dashboard mobile final row v14
   - keep free feedback as the bottom-right chip
   - move hunter log down onto the same line
========================= */
@media (max-width: 768px) {
    .hunter-page .hunter-base-dashboard.is-rank-removed {
        bottom: 12px !important;
        grid-template-areas:
            "checkin daily"
            "log log" !important;
        grid-template-rows: repeat(2, 72px) !important;
        gap: 8px !important;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="checkin"] {
        grid-area: checkin;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="daily"] {
        grid-area: daily;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="log"] {
        grid-area: log;
        min-width: 0;
        margin-right: 104px;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free {
        position: absolute !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        top: auto !important;
        z-index: 8;

        width: auto !important;
        min-width: 88px !important;
        height: 34px !important;
        min-height: 0 !important;
        padding: 4px 10px !important;
        border-radius: 999px !important;

        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas: "main";
        align-items: center;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free::after {
        display: none;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-quick-main {
        justify-content: center;
        gap: 6px;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-quick-icon {
        width: 20px;
        height: 20px;
        border-radius: 999px;
        font-size: 12px;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-quick-copy strong {
        font-size: 11px;
        line-height: 1;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-quick-copy small,
    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-card-pill {
        display: none;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="daily"] .hunter-daily-task-progress {
        background: rgba(255, 244, 214, .94);
        color: #9a3412;
        border: 1px solid rgba(245, 158, 11, .20);
    }
}

@media (max-width: 420px) {
    .hunter-page .hunter-base-dashboard.is-rank-removed {
        bottom: 10px !important;
        grid-template-rows: repeat(2, 64px) !important;
        gap: 7px !important;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed [data-hunter-base-card="log"] {
        margin-right: 96px;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free {
        min-width: 82px !important;
        height: 32px !important;
        padding: 4px 9px !important;
    }

    .hunter-page .hunter-base-dashboard.is-rank-removed .hunter-base-quick-card-free .hunter-base-quick-copy strong {
        font-size: 10px;
    }
}

/* =========================
   Mobile base card tap target fix
   - allow tapping the whole shortcut card, not only the inner text button
   - disabled "今日已完成" chip should not swallow taps when the user wants details
========================= */
@media (max-width: 768px) {
    .hunter-page .hunter-base-quick-card[data-hunter-base-card] {
        cursor: pointer;
        touch-action: manipulation;
    }

    .hunter-page .hunter-base-quick-card-checkin .hunter-checkin-btn:disabled {
        pointer-events: none;
    }
}
