/**
 * 喪Search User Actions - Styles
 * 檔案：ss-user-actions.css
 * 放置位置：/wp-content/plugins/ss-user-actions/ss-user-actions.css
 */

/* ========== Login Modal Overlay ========== */
.ss-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ========== Login Modal Box ========== */
.ss-login-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: ssModalIn 0.25s ease;
}

@keyframes ssModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== Close Button ========== */
.ss-login-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #7a7068;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.ss-login-close:hover {
    color: #3d3630;
}

/* ========== Brand ========== */
.ss-login-brand {
    text-align: center;
    margin-bottom: 24px;
}
.ss-login-logo {
    display: inline-block;
    background: #8fa998;
    color: white;
    font-size: 20px;
    font-weight: 900;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 10px;
    text-align: center;
    vertical-align: middle;
}
.ss-login-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #3d3630;
    margin-left: 8px;
    vertical-align: middle;
    font-family: 'Noto Sans TC', sans-serif;
}

/* ========== Tabs ========== */
.ss-login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e8e4dc;
}
.ss-login-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #7a7068;
    cursor: pointer;
    font-family: 'Noto Sans TC', sans-serif;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.ss-login-tab.active {
    color: #8fa998;
    border-bottom-color: #8fa998;
}
.ss-login-tab:hover:not(.active) {
    color: #3d3630;
}

/* ========== Form Fields ========== */
.ss-login-form {
    margin: 0;
}
.ss-login-field {
    margin-bottom: 16px;
}
.ss-login-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3d3630;
    margin-bottom: 6px;
}
.ss-login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e8e4dc;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    color: #3d3630;
    background: #faf8f4;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.ss-login-field input:focus {
    border-color: #8fa998;
    box-shadow: 0 0 0 3px rgba(143, 169, 152, 0.15);
    background: #ffffff;
}

/* ========== Error Message ========== */
.ss-login-error {
    background: #fef2f0;
    border: 1px solid #f5c6c0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c0392b;
    margin-bottom: 16px;
}

/* ========== Submit Button ========== */
.ss-login-submit {
    width: 100%;
    padding: 12px 20px;
    background: #8fa998;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Noto Sans TC', sans-serif;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.ss-login-submit:hover {
    background: #6d8a7a;
}
.ss-login-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ========== Hint Text ========== */
.ss-login-hint {
    text-align: center;
    font-size: 12px;
    color: #7a7068;
    margin-top: 20px;
    margin-bottom: 0;
}

/* ========== Forgot Password Link ========== */
.ss-forgot-link {
    background: none;
    border: none;
    font-size: 12px;
    color: #8fa998;
    cursor: pointer;
    padding: 0;
    font-family: 'Noto Sans TC', sans-serif;
    text-decoration: underline;
    transition: color 0.2s;
}
.ss-forgot-link:hover {
    color: #6d8a7a;
}

/* ========== Success Message ========== */
.ss-login-success {
    background: #eef4ef;
    border: 1px solid #d4e3d6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #4a7a5a;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .ss-login-modal {
        padding: 28px 24px;
        max-width: 340px;
    }
    .ss-login-logo {
        font-size: 18px;
        width: 36px;
        height: 36px;
        line-height: 36px;
    }
    .ss-login-logo-text {
        font-size: 18px;
    }
}

/* ==========================================================
   統一 Visited 按鈕狀態（所有 context 共用）
   .ss-action-visited 係三個 context 都有嘅 class
   ========================================================== */

/* --- 共用狀態 --- */
.ss-action-visited { transition: all 0.25s; }
.ss-action-visited.is-loading { opacity: 0.6; pointer-events: none; }
.ss-action-visited.is-success { animation: ssActionPop 0.4s ease; }

/* --- is-active（去過啦 ✓）--- */
.ss-action-visited.is-active { background: #eef4ef !important; color: #6d8a7a !important; border-color: #d4e3d6 !important; }
.ss-action-visited.is-active i { color: #8fa998; }

/* --- is-checked-in（已打卡 ✓）--- */
.ss-action-visited.is-active.is-checked-in { background: #8fa998 !important; color: #fff !important; border-color: #8fa998 !important; }
.ss-action-visited.is-active.is-checked-in i { color: #fff !important; }

/* ==========================================================
   統一 Trip 按鈕狀態（所有 context 共用）
   ========================================================== */
.ss-fcard-btn--trip.is-in-trip,
.ss-modal-action-trip.is-in-trip,
.ss-sticky-btn.is-in-trip { opacity: 0.7; cursor: default; }

/* ==========================================================
   Bookmark 按鈕狀態
   ========================================================== */
.ss-action-bookmark.is-loading { opacity: 0.6; pointer-events: none; }
.ss-action-bookmark.is-success { animation: ssActionPop 0.4s ease; }

@keyframes ssActionPop {
    0% { transform: scale(1); }
    30% { transform: scale(1.08); }
    60% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

/* ==========================================================
   Visited Stat 顯示
   ========================================================== */
.ss-visited-stat { display: none; font-size: 0.85rem; color: #7a7068; text-align: center; padding: 8px 0 0; }
.ss-visited-stat .ss-visited-count { font-weight: 700; color: #8fa998; }

/* ==========================================================
   喪玩兵團 Toast
   ========================================================== */
#ss-brigade-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #3d3630;
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px 12px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    z-index: 9999;
    min-width: 280px;
    max-width: 360px;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
#ss-brigade-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.ss-brigade-toast__icon { font-size: 22px; flex-shrink: 0; }
.ss-brigade-toast__body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ss-brigade-toast__body strong { font-size: 13px; font-weight: 700; }
.ss-brigade-toast__body span { font-size: 11px; opacity: 0.75; }
.ss-brigade-toast__link { font-size: 12px; font-weight: 700; color: #c5d9cf; white-space: nowrap; text-decoration: none; flex-shrink: 0; }
.ss-brigade-toast__link:hover { color: #fff; }
.ss-brigade-toast__close { background: none; border: none; color: rgba(255, 255, 255, 0.5); font-size: 16px; cursor: pointer; padding: 0 0 0 6px; line-height: 1; flex-shrink: 0; }
.ss-brigade-toast__close:hover { color: #fff; }
@media (max-width: 480px) {
    #ss-brigade-toast { bottom: 16px; min-width: 0; width: calc(100vw - 32px); max-width: none; }
}