/* ============================================================
   SWPM WooCommerce — Minha Conta
   ============================================================ */

/* ── Base ────────────────────────────────────────────────── */
.swpm-account-page  { max-width: 860px; }
.swpm-section       { margin-bottom: 36px; }
.swpm-section-title {
    font-size: 18px; font-weight: 700; color: #1a1a2e;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px; margin-bottom: 20px;
}

/* ── Dashboard ───────────────────────────────────────────── */
.swpm-dashboard-wrap { max-width: 860px; }
.swpm-dash-greeting {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg,#0073aa,#00b4d8);
    color: #fff; border-radius: 12px;
    padding: 24px; margin-bottom: 24px;
}
.swpm-avatar { border-radius: 50%; border: 3px solid rgba(255,255,255,.4); }
.swpm-dash-hello h2 { margin: 0 0 4px; color: #fff; font-size: 22px; }
.swpm-dash-hello p  { margin: 0; opacity: .9; font-size: 14px; }

.swpm-dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 14px; margin-bottom: 24px;
}
.swpm-dash-card {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 10px; padding: 16px;
    text-decoration: none; color: #333;
    transition: all .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.swpm-dash-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 16px rgba(0,115,170,.15);
    transform: translateY(-2px);
    text-decoration: none; color: #0073aa;
}
.swpm-dash-card.card-active    { border-left: 4px solid #28a745; }
.swpm-dash-card.card-upgrade   { border-left: 4px solid #ffc107; }
.swpm-dash-card.card-exclusive { border-left: 4px solid #6f42c1; }
.swpm-card-icon  { font-size: 28px; line-height: 1; }
.swpm-card-body  { flex: 1; }
.swpm-card-title { font-weight: 700; font-size: 14px; }
.swpm-card-sub   { font-size: 12px; color: #888; margin-top: 2px; }
.swpm-card-arrow { font-size: 20px; color: #ccc; }

.swpm-dash-last-order { background: #f8f9fa; border-radius: 8px; padding: 16px 20px; }
.swpm-dash-last-order h3 { margin: 0 0 12px; font-size: 15px; }
.swpm-last-order-info { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 14px; }

/* ── Assinatura ──────────────────────────────────────────── */
.swpm-assinatura-wrap { max-width: 520px; }

.swpm-sub-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.10);
    border: 1px solid #e5e7eb; margin-bottom: 16px;
    transition: box-shadow .2s;
}
.swpm-sub-card:hover        { box-shadow: 0 8px 32px rgba(0,0,0,.14); }
.swpm-sub-card.sub-active   { border-top: 4px solid #28a745; }
.swpm-sub-card.sub-expiring { border-top: 4px solid #e67e22; }
.swpm-sub-card.sub-expired  { border-top: 4px solid #dc3545; }

.swpm-sub-cover {
    height: 180px; background-size: cover;
    background-position: center; position: relative;
    background-color: #0073aa;
}
.swpm-sub-cover::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom,rgba(0,0,0,.10),rgba(0,0,0,.45));
}
.swpm-sub-state-badge {
    position: absolute; bottom: 14px; left: 16px; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
    color: #fff; font-size: 12px; font-weight: 700;
    padding: 5px 12px; border-radius: 20px;
}
.state-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; animation: swpmPulse 1.8s infinite;
}
.dot-active   { background: #2ecc71; }
.dot-expiring { background: #f39c12; }
.dot-expired  { background: #e74c3c; animation: none; }

@keyframes swpmPulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.6; transform:scale(1.25); }
}

.swpm-sub-body { padding: 22px 24px 20px; }

.swpm-sub-title-row {
    display: flex; justify-content: space-between;
    align-items: flex-start; gap: 16px; margin-bottom: 18px;
}
.swpm-sub-label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: #999; margin: 0 0 4px; }
.swpm-sub-title { font-size: 22px; font-weight: 800; color: #1a1a2e; margin: 0; line-height: 1.2; }
.swpm-sub-level-tag { font-size: 12px; color: #0073aa; margin: 4px 0 0; font-weight: 600; }

.swpm-sub-price-box { text-align: right; flex-shrink: 0; }
.swpm-sub-price { display: block; font-size: 22px; font-weight: 800; color: #0073aa; line-height: 1.1; }
.swpm-sub-price .woocommerce-Price-amount { font-size: 22px; }
.swpm-sub-period { display: block; font-size: 12px; color: #999; margin-top: 2px; }

.swpm-sub-divider { height: 1px; background: #f0f0f0; margin: 16px 0; }

.swpm-sub-dates { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.swpm-sub-date-item { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.swpm-sub-date-label { color: #666; }
.swpm-sub-date-val   { font-weight: 600; color: #1a1a2e; }
.val-green  { color: #28a745; }
.val-orange { color: #e67e22; }
.val-red    { color: #dc3545; }

.swpm-sub-progress-bar  { height: 8px; background: #e9ecef; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.swpm-sub-progress-fill { height: 100%; border-radius: 8px; transition: width .8s ease; }
.swpm-sub-progress-labels { display: flex; justify-content: space-between; font-size: 11px; color: #aaa; }

.swpm-sub-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.swpm-sub-note    { font-size: 13px; color: #999; text-align: center; }
.swpm-sub-note a  { color: #0073aa; }

/* ── Botões gerais da conta ──────────────────────────────── */
.swpm-action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: 8px;
    font-size: 14px; font-weight: 700;
    text-decoration: none; transition: all .2s;
    cursor: pointer; border: none;
}
.swpm-btn-renew {
    background: #0073aa; color: #fff !important; flex: 1; justify-content: center;
}
.swpm-btn-renew:hover { background: #005a87; transform: translateY(-1px); text-decoration: none; }
.swpm-btn-more {
    background: #f0f6ff; color: #0073aa !important;
    border: 1px solid #0073aa; flex: 1; justify-content: center;
}
.swpm-btn-more:hover { background: #0073aa; color: #fff !important; text-decoration: none; }

.swpm-btn         { display: inline-block; padding: 10px 22px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; transition: all .2s; border: none; cursor: pointer; }
.swpm-btn-primary { background: #0073aa; color: #fff !important; }
.swpm-btn-primary:hover { background: #005a87; transform: translateY(-1px); }
.swpm-btn-outline { background: transparent; color: #0073aa !important; border: 2px solid #0073aa; }
.swpm-btn-outline:hover { background: #0073aa; color: #fff !important; }

.swpm-btn-small {
    display: inline-block; padding: 5px 12px; border-radius: 4px;
    font-size: 12px; font-weight: 600; background: #f0f6ff;
    color: #0073aa; text-decoration: none;
    border: 1px solid #0073aa; cursor: pointer; transition: all .2s;
}
.swpm-btn-small:hover  { background: #0073aa; color: #fff; }
.swpm-btn-remove { background: #fff0f0; color: #dc3545; border-color: #dc3545; }
.swpm-btn-remove:hover { background: #dc3545; color: #fff; }

/* ── Status badges ───────────────────────────────────────── */
.swpm-order-status        { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.swpm-status-completed    { background: #d4edda; color: #155724; }
.swpm-status-processing   { background: #cce5ff; color: #004085; }
.swpm-status-refunded     { background: #f8d7da; color: #721c24; }
.swpm-status-cancelled    { background: #e2e3e5; color: #383d41; }
.swpm-status-pending      { background: #fff3cd; color: #856404; }

/* ── Grid de posts ───────────────────────────────────────── */
.swpm-posts-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 20px; }
.swpm-post-card  {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; transition: all .2s; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.swpm-post-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.swpm-post-thumb      { height: 160px; background-size: cover; background-position: center; position: relative; }
.swpm-exclusive-label {
    position: absolute; top: 10px; left: 10px;
    background: rgba(0,0,0,.7); color: #fff;
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
}
.swpm-post-info    { padding: 14px; }
.swpm-post-cat     { font-size: 11px; font-weight: 700; color: #0073aa; text-transform: uppercase; letter-spacing: .5px; }
.swpm-post-date    { font-size: 11px; color: #999; margin: 2px 0 6px; }
.swpm-post-info h4 { margin: 0 0 6px; font-size: 15px; line-height: 1.4; }
.swpm-post-info h4 a { color: #1a1a2e; text-decoration: none; }
.swpm-post-info h4 a:hover { color: #0073aa; }
.swpm-post-info p  { font-size: 13px; color: #666; margin: 0 0 10px; line-height: 1.5; }
.swpm-post-actions { display: flex; gap: 8px; }

/* ── Histórico ───────────────────────────────────────────── */
.swpm-history-list  { display: flex; flex-direction: column; gap: 12px; }
.swpm-history-item  {
    display: flex; gap: 14px; align-items: center;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 8px; padding: 12px; transition: all .2s;
}
.swpm-history-item:hover  { border-color: #0073aa; }
.swpm-history-thumb       { width: 72px; height: 72px; border-radius: 6px; background-size: cover; background-position: center; flex-shrink: 0; }
.swpm-thumb-placeholder   { background: #f0f6ff; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.swpm-history-info        { flex: 1; min-width: 0; }
.swpm-history-cat         { font-size: 11px; font-weight: 700; color: #0073aa; text-transform: uppercase; }
.swpm-history-info h4     { margin: 3px 0 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swpm-history-info h4 a   { color: #1a1a2e; text-decoration: none; }
.swpm-history-meta        { font-size: 11px; color: #999; display: flex; gap: 12px; }
.swpm-history-actions     { flex-shrink: 0; }

/* ── Filtros ─────────────────────────────────────────────── */
.swpm-filter-bar  { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.swpm-filter-btn  { padding: 6px 16px; border: 1px solid #ddd; border-radius: 20px; background: #fff; cursor: pointer; font-size: 13px; transition: all .2s; }
.swpm-filter-btn.active,
.swpm-filter-btn:hover { background: #0073aa; color: #fff; border-color: #0073aa; }

/* ── Empty state ─────────────────────────────────────────── */
.swpm-empty-state      { text-align: center; padding: 48px 24px; background: #f8f9fa; border-radius: 10px; border: 2px dashed #dee2e6; }
.swpm-empty-icon       { font-size: 48px; margin-bottom: 12px; }
.swpm-empty-state h3   { margin: 0 0 8px; color: #1a1a2e; }
.swpm-empty-state p    { color: #666; margin-bottom: 20px; }

/* ── Sem assinatura ──────────────────────────────────────── */
.swpm-no-sub-wrap      { text-align: center; padding: 48px 24px; background: #f8f9fa; border-radius: 16px; border: 2px dashed #dee2e6; }
.swpm-no-sub-icon      { font-size: 52px; margin-bottom: 14px; }
.swpm-no-sub-wrap h3   { font-size: 20px; color: #1a1a2e; margin: 0 0 8px; }
.swpm-no-sub-wrap p    { color: #666; margin-bottom: 24px; }

/* ── Level badge ─────────────────────────────────────────── */
.swpm-level-badge      { display: inline-block; background: #0073aa; color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-left: 10px; vertical-align: middle; }
.swpm-exclusivos-header { display: flex; align-items: center; margin-bottom: 8px; }

/* ── FAQ ─────────────────────────────────────────────────── */
.swpm-faq-section  { background: #f8f9fa; border-radius: 10px; padding: 20px 24px; }
.swpm-faq-item     { border-bottom: 1px solid #e9ecef; }
.swpm-faq-item:last-child { border-bottom: none; }
.swpm-faq-q        { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; cursor: pointer; font-weight: 600; font-size: 14px; color: #1a1a2e; }
.swpm-faq-arrow    { font-size: 18px; transition: transform .2s; color: #0073aa; }
.swpm-faq-item.open .swpm-faq-arrow { transform: rotate(90deg); }
.swpm-faq-a        { display: none; padding: 0 0 14px; font-size: 14px; color: #555; line-height: 1.6; }
.swpm-faq-item.open .swpm-faq-a { display: block; }

/* ── Tabela de pagamentos ────────────────────────────────── */
.swpm-payments-table-wrap  { overflow-x: auto; }
.swpm-payments-table       { width: 100%; border-collapse: collapse; font-size: 14px; }
.swpm-payments-table th,
.swpm-payments-table td    { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; text-align: left; }
.swpm-payments-table th    { background: #f8f9fa; font-weight: 600; color: #555; font-size: 12px; text-transform: uppercase; }
.swpm-payments-table tr:hover td { background: #f8f9ff; }

/* ── Responsivo ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .swpm-dash-greeting  { flex-direction: column; text-align: center; }
    .swpm-sub-title-row  { flex-direction: column; }
    .swpm-sub-price-box  { text-align: left; }
    .swpm-sub-actions    { flex-direction: column; }
    .swpm-assinatura-wrap { max-width: 100%; }
    .swpm-posts-grid     { grid-template-columns: 1fr; }
    .swpm-history-item   { flex-wrap: wrap; }
    .swpm-last-order-info { flex-direction: column; gap: 6px; }
    .swpm-dash-cards     { grid-template-columns: 1fr 1fr; }
}