/* =========================================================
   PKG Sugestão de Jogos — Frontend styles
   ========================================================= */

.pkg-sugestao-wrap {
    max-width: 960px;
    font-family: inherit;
}

/* ── Seções ─────────────────────────────────────────────── */

.pkg-sugestao-form-section {
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 36px;
}

.pkg-section-title {
    margin: 0 0 6px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
}

.pkg-count {
    background: #6366f1;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
}

.pkg-hint {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0 0 18px;
}

.pkg-notice-box {
    background: #1e1a0e;
    border: 1px solid #4b3700;
    border-radius: 8px;
    padding: 16px 20px;
    color: #f0c060;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* ── Search box ──────────────────────────────────────────── */

.pkg-search-box {
    position: relative;
    margin-bottom: 4px;
}

#pkg-game-search {
    width: 100%;
    padding: 13px 18px;
    border: 2px solid #2a2a4a;
    border-radius: 8px;
    background: #0c0c1a;
    color: #e2e8f0;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#pkg-game-search::placeholder { color: #475569; }

#pkg-game-search:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* ── Autocomplete dropdown ───────────────────────────────── */

.pkg-autocomplete {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1a1a30;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    z-index: 1000;
    max-height: 380px;
    overflow-y: auto;
    display: none;
}

.pkg-autocomplete:empty { display: none !important; }

.pkg-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #22223a;
    transition: background 0.15s;
}

.pkg-autocomplete-item:last-child { border-bottom: none; }

.pkg-autocomplete-item:hover:not(.pkg-item-exists) {
    background: #252545;
}

.pkg-autocomplete-item.pkg-item-exists {
    opacity: 0.85;
    cursor: pointer;
}

.pkg-autocomplete-item.pkg-item-exists:hover {
    background: #1e1e38;
}

.pkg-item-thumb {
    width: 54px;
    height: 40px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
    background: #0c0c1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pkg-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pkg-thumb-placeholder {
    color: #2a2a4a;
    font-size: 1.2rem;
}

.pkg-item-info {
    flex: 1;
    min-width: 0;
}

.pkg-item-info strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pkg-item-info span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pkg-already-badge {
    flex-shrink: 0;
    background: #6366f1;
    color: #fff;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.pkg-searching,
.pkg-no-results {
    padding: 18px;
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.pkg-search-tip {
    padding: 8px 14px;
    background: #0f0f23;
    color: #818cf8;
    font-size: 0.75rem;
    border-top: 1px solid #2a2a4a;
    text-align: center;
}

.pkg-load-more-indicator {
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #2a2a4a;
}

.pkg-load-more-hint {
    padding: 6px 14px;
    text-align: center;
    font-size: 0.72rem;
    color: #475569;
    border-top: 1px solid #1e1e38;
}

/* ── Game preview ────────────────────────────────────────── */

.pkg-game-preview {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-top: 16px;
    padding: 16px;
    background: #0c0c1a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    flex-wrap: wrap;
}

#pkg-game-cover {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 7px;
    flex-shrink: 0;
}

.pkg-game-info {
    flex: 1;
    min-width: 160px;
}

.pkg-game-info h4 {
    margin: 0 0 6px;
    color: #e2e8f0;
    font-size: 1rem;
}

.pkg-detail {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
}

.pkg-request-count {
    color: #818cf8;
    font-weight: 700;
    margin-top: 6px !important;
    font-size: 0.85rem !important;
}

.pkg-preview-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

/* ── Form feedback ───────────────────────────────────────── */

.pkg-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pkg-feedback.success { background: #0d2e1f; border: 1px solid #10b981; color: #10b981; }
.pkg-feedback.warning { background: #2e1f0d; border: 1px solid #f59e0b; color: #f59e0b; }
.pkg-feedback.error   { background: #2e0d0d; border: 1px solid #ef4444; color: #ef4444; }

/* ── Buttons ─────────────────────────────────────────────── */

.pkg-btn {
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    white-space: nowrap;
}

.pkg-btn-primary {
    background: #6366f1;
    color: #fff;
}

.pkg-btn-primary:hover:not(:disabled) { background: #4f52d1; }

.pkg-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pkg-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #2a2a4a;
}

.pkg-btn-ghost:hover { color: #e2e8f0; border-color: #6366f1; }

/* ── Suggestions grid ────────────────────────────────────── */

.pkg-sugestao-list-section { margin-top: 8px; }

.pkg-sugestao-list-section .pkg-section-title { margin-bottom: 18px; }

.pkg-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

.pkg-suggestion-card {
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
}

.pkg-suggestion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* Cover */
.pkg-card-cover {
    position: relative;
    flex-shrink: 0;
}

.pkg-card-cover img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.pkg-cover-placeholder {
    height: 130px;
    background: linear-gradient(135deg, #1a1a30, #0c0c1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #2a2a4a;
}

.pkg-cover-placeholder::before { content: '🎮'; }

/* Status badge */
.pkg-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pkg-status-pending     { background: #f59e0b; color: #000; }
.pkg-status-analyzed    { background: #818cf8; color: #fff; }
.pkg-status-approved    { background: #22c55e; color: #000; }
.pkg-status-in-progress { background: #6366f1; color: #fff; }
.pkg-status-done        { background: #059669; color: #fff; }
.pkg-status-rejected    { background: #ef4444; color: #fff; }

/* Body */
.pkg-card-body {
    padding: 12px 14px;
    flex: 1;
}

.pkg-card-body h4 {
    margin: 0 0 6px;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.3;
}

.pkg-platforms,
.pkg-released {
    margin: 0;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.5;
}

.pkg-admin-notes-wrap {
    position: relative;
    margin: 8px 0 0;
}

.pkg-admin-notes {
    margin: 0;
    color: #86efac;
    font-size: 0.75rem;
    padding: 6px 26px 6px 8px;
    background: rgba(134,239,172,.07);
    border-left: 2px solid #22c55e;
    border-radius: 0 4px 4px 0;
    overflow: hidden;
    max-height: 3.2em;
    line-height: 1.55;
    word-break: break-word;
}

/* Normaliza o HTML dentro da nota para não distorcer a altura */
.pkg-admin-notes p  { margin: 0; }
.pkg-admin-notes ul { margin: 0; padding-left: 1.2em; }
.pkg-admin-notes a  { color: #86efac; text-decoration: underline; }

.pkg-note-expand-btn {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    background: rgba(134,239,172,.15);
    border: 1px solid #22c55e;
    border-radius: 3px;
    color: #86efac;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.pkg-note-expand-btn:hover { background: rgba(134,239,172,.35); }

/* ── Modal de nota (frontend) ────────────────────────────── */

.pkg-note-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.pkg-note-modal.pkg-modal-open { display: flex; }

.pkg-note-modal-inner {
    background: #1a1a30;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 24px;
    width: 460px;
    max-width: 100%;
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
}

.pkg-note-modal-inner h4 {
    margin: 0 0 14px;
    color: #86efac;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pkg-note-modal-inner h4::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #22c55e;
    border-radius: 2px;
    flex-shrink: 0;
}

.pkg-note-modal-text {
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 0 0 18px;
    word-break: break-word;
}

.pkg-note-modal-text p  { margin: 0 0 6px; }
.pkg-note-modal-text ul { margin: 4px 0; padding-left: 1.4em; }
.pkg-note-modal-text a  { color: #86efac; }

/* Botão de download da tradução no card */
.pkg-download-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 12px;
    background: #6366f1;
    color: #fff;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.pkg-download-link:hover {
    background: #4f46e5;
    color: #fff;
    text-decoration: none;
}

/* Footer */
.pkg-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid #1e1e38;
}

.pkg-vote-count {
    color: #64748b;
    font-size: 0.8rem;
}

.pkg-vote-btn {
    background: #1e1e38;
    color: #94a3b8;
    border: 1px solid #2a2a4a;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.18s;
    font-weight: 600;
}

.pkg-vote-btn:hover:not(:disabled):not(.voted) {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.pkg-vote-btn.voted:not(:disabled) {
    background: #0d2e1f;
    border-color: #10b981;
    color: #10b981;
    cursor: pointer;
}

.pkg-vote-btn.voted:not(:disabled):hover {
    background: #1a3a28;
    border-color: #ef4444;
    color: #ef4444;
}

.pkg-vote-btn:disabled {
    background: #0d2e1f;
    border-color: #10b981;
    color: #10b981;
    cursor: not-allowed;
    opacity: .7;
}

/* Agrupamento botões no footer do card */
.pkg-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Botão remover sugestão (patrono) */
.pkg-delete-own-btn {
    background: transparent;
    color: #64748b;
    border: 1px solid transparent;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.pkg-delete-own-btn:hover:not(:disabled) {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.3);
    color: #ef4444;
}

.pkg-delete-own-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Aviso de regras de remoção */
.pkg-suggestion-rule-notice {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ── Limite banner (dentro do form) ─────────────────────── */

.pkg-limit-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(99,102,241,.08);
    border: 1px solid rgba(99,102,241,.2);
    border-radius: 8px;
    font-size: 0.83rem;
    color: #94a3b8;
    margin-bottom: 14px;
}

.pkg-limit-banner strong { color: #e2e8f0; }

.pkg-renewal-hint {
    margin-left: auto;
    font-size: 0.78rem;
    opacity: 0.7;
    white-space: nowrap;
}

.pkg-limit-banner.pkg-limit-no-access {
    background: rgba(239,68,68,.07);
    border-color: rgba(239,68,68,.2);
    color: #f87171;
}

/* ── Shortcode [pkg_sugestao_status] ─────────────────────── */

.pkg-status-card {
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 18px 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.pkg-status-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.pkg-status-header h4 {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.pkg-status-bar-wrap {
    height: 8px;
    background: #1e1e38;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pkg-status-bar-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 4px;
}

.pkg-status-bar-fill.pkg-bar-full { background: #ef4444; }

.pkg-status-info {
    color: #94a3b8;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.pkg-status-info strong { color: #e2e8f0; }

.pkg-status-renewal {
    color: #6366f1;
    font-size: 0.78rem;
    margin: 6px 0 0;
    opacity: 0.85;
}

.pkg-status-message {
    color: #94a3b8;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

.pkg-status-message.pkg-status-blocked { color: #f87171; }
.pkg-status-message.pkg-status-warn    { color: #f59e0b; }

.pkg-status-login-link {
    color: #6366f1;
    text-decoration: underline;
    font-weight: 600;
}
.pkg-status-login-link:hover { color: #818cf8; }

/* ── Misc ────────────────────────────────────────────────── */

.pkg-empty {
    color: #475569;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    border: 1px dashed #2a2a4a;
    border-radius: 10px;
}

.pkg-notice {
    color: #64748b;
    font-style: italic;
    padding: 20px;
    border: 1px dashed #2a2a4a;
    border-radius: 8px;
}

/* ── Toast notifications ─────────────────────────────────── */

.pkg-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 13px 22px;
    border-radius: 9px;
    font-size: 0.875rem;
    font-weight: 700;
    z-index: 9999;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.28s, opacity 0.28s;
    pointer-events: none;
    max-width: 320px;
}

.pkg-toast.pkg-toast-show { transform: translateY(0); opacity: 1; }
.pkg-toast-success { background: #10b981; color: #fff; }
.pkg-toast-warning { background: #f59e0b; color: #000; }
.pkg-toast-error   { background: #ef4444; color: #fff; }

/* ── Aviso para não-patronos ─────────────────────────────── */

.pkg-patron-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #13131f;
    border: 1px solid #2a2a4a;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.pkg-patron-notice-icon { font-size: 1.8rem; flex-shrink: 0; }

.pkg-patron-notice strong { display: block; color: #e2e8f0; margin-bottom: 3px; }

.pkg-patron-notice-link {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 14px;
    background: #6366f1;
    color: #fff;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.pkg-patron-notice-link:hover {
    background: #4f46e5;
    color: #fff;
    text-decoration: none;
}

/* ── Abas de status ──────────────────────────────────────── */

.pkg-status-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 4px;
    border-bottom: 1px solid #1e1e38;
}

.pkg-stab {
    padding: 5px 13px;
    border-radius: 99px;
    border: 1px solid #2a2a4a;
    background: transparent;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pkg-stab:hover { color: #e2e8f0; border-color: #6366f1; }

.pkg-stab.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.pkg-stab-count {
    background: rgba(255,255,255,.18);
    border-radius: 99px;
    padding: 1px 6px;
    font-size: 0.72rem;
}

.pkg-stab.active .pkg-stab-count { background: rgba(255,255,255,.25); }

/* ── Modal do patrono ────────────────────────────────────── */

.pkg-patron-modal-inner {
    text-align: center;
}

.pkg-patron-modal-inner h4 {
    margin-bottom: 10px;
    color: #e2e8f0;
    font-size: 1rem;
}

.pkg-patron-modal-inner .pkg-note-modal-text {
    margin-bottom: 18px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.pkg-patron-cta {
    display: inline-block;
    text-decoration: none;
}

/* ── Patch notes (timeline nos cards) ───────────────────── */

.pkg-patch-entry-preview {
    display: flex;
    gap: 6px;
    font-size: 0.72rem;
    line-height: 1.45;
    margin-bottom: 3px;
}

.pkg-patch-date-preview {
    color: #4ade80;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
}

/* Modal patch notes timeline */

.pkg-patch-timeline { display: flex; flex-direction: column; gap: 10px; }

.pkg-patch-timeline-entry {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #2a2a4a;
}

.pkg-patch-timeline-entry:last-child { border-bottom: none; }

.pkg-patch-timeline-date {
    min-width: 110px;
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 600;
    flex-shrink: 0;
    padding-top: 1px;
}

.pkg-patch-timeline-text {
    color: #e2e8f0;
    font-size: 0.875rem;
    line-height: 1.55;
}
