/* ================================================
   LiberalVibe.com — Componentes Reutilizáveis
   Badges, Botões, Tooltips, Modais, etc
   ================================================ */

/* ============================
   BADGES
   ============================ */
.badge {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: auto;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-grey { background-color: var(--badge-bg-grey); color: var(--text-primary); }
.badge-purple { background-color: var(--badge-bg-purple); color: var(--badge-text-purple); }
.badge-orange { background-color: var(--badge-bg-orange); color: var(--text-primary); }
.badge-pink { background-color: var(--btn-pink); color: #ffffff; }
.badge-green { background-color: var(--btn-green); color: #ffffff; }

/* Badge online (bolinha verde) */
.online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--online-green);
    display: inline-block;
    flex-shrink: 0;
}

.online-dot-sm {
    width: 8px;
    height: 8px;
}

.online-dot-lg {
    width: 14px;
    height: 14px;
    border: 2px solid var(--bg-main);
}

/* Badge premium (estrela verde) */
.premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--btn-green);
    color: #ffffff;
    font-size: 10px;
    border: 1px solid #ffffff;
    flex-shrink: 0;
}

/* ── Linha nome + badge de novato ── */
.post-user-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.2;
}

/* Badge "SOU NOVATO POR AQUI!" — visível 24h apenas na 1ª postagem */
.newbie-post-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #FFD700;          /* amarelo dourado */
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    animation: newbie-glow 2s ease-in-out infinite alternate;
}
.newbie-post-badge strong {
    color: #FFD700;
    font-weight: 800;
}
@keyframes newbie-glow {
    from { box-shadow: 0 0 0px rgba(255,215,0,0); }
    to   { box-shadow: 0 0 8px rgba(255,215,0,0.45); }
}

/* ============================
   BOTÕES
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--btn-pink);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--btn-pink-hover);
    color: #ffffff;
}

.btn-success {
    background-color: var(--btn-green);
    color: #ffffff;
}

.btn-success:hover {
    background-color: #159c52;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

/* Amigo mútuo — verde */
.btn-friend {
    background: rgba(29, 185, 84, .12);
    border: 1px solid rgba(29, 185, 84, .5);
    color: #1db954;
}
.btn-friend:hover {
    background: rgba(29, 185, 84, .22);
    color: #1db954;
}

.btn-white {
    background-color: #ffffff;
    color: #1a1c20;
}

.btn-white:hover {
    opacity: 0.9;
    color: #1a1c20;
}

.btn-danger {
    background-color: var(--btn-danger);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
}

.btn-icon:hover {
    background-color: var(--hover-bg);
}

/* ============================
   TOOLTIPS MOBILE
   ============================ */
.m-icon-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.m-tooltip {
    position: absolute;
    background-color: var(--badge-bg-grey);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    border: 1px solid var(--border-color);
    z-index: var(--z-tooltip);
}

.m-tooltip::after {
    content: '';
    position: absolute;
    border-width: 5px;
    border-style: solid;
}

.tt-down {
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
}

.tt-down::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-color: transparent transparent var(--badge-bg-grey) transparent;
}

.tt-up {
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
}

.tt-up::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-color: var(--badge-bg-grey) transparent transparent transparent;
}

.m-icon-box:focus .m-tooltip,
.m-icon-box:active .m-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================
   AVATAR
   ============================ */
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #333;
    flex-shrink: 0;
}

.avatar-sm { width: 26px; height: 26px; }
.avatar-md { width: 42px; height: 42px; }
.avatar-lg { width: 80px; height: 80px; }
.avatar-xl { width: 120px; height: 120px; }

/* ============================
   FORMULÁRIOS
   ============================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    transition: border-color var(--transition-base);
}

.form-input:focus {
    border-color: var(--btn-pink);
}

.form-select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371767b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--btn-pink);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--btn-pink);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.form-error {
    color: var(--btn-danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* ============================
   MODAIS GLOBAIS
   ============================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

/* Lightboxes de foto e vídeo ficam acima da nav mobile (z:1000) */
#photoLightbox,
#videoLightbox {
    z-index: 1001;
    padding: 0;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-main);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 800;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================
   LOADING / SPINNER
   ============================ */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--btn-pink);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* ============================
   EMPTY STATE / PLACEHOLDER
   ============================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 300px;
}

/* Em desenvolvimento */
.dev-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
    text-align: center;
}

.dev-placeholder i {
    font-size: 64px;
    color: var(--btn-pink);
    margin-bottom: 20px;
}

.dev-placeholder h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.dev-placeholder p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ============================
   ALERT / TOAST — Centralizado
   ============================ */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    pointer-events: none;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.toast {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px 22px 20px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
    animation: toastIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: all;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.toast i {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    animation: toastProgress linear forwards;
    transform-origin: left;
}

.toast-success {
    border-color: rgba(29,185,84,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 20px rgba(29,185,84,0.15);
}
.toast-success i { color: #1db954; }
.toast-success .toast-progress { background: #1db954; }

.toast-error {
    border-color: rgba(239,68,68,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 20px rgba(239,68,68,0.15);
}
.toast-error i { color: #ef4444; }
.toast-error .toast-progress { background: #ef4444; }

.toast-warning {
    border-color: rgba(234,179,8,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 20px rgba(234,179,8,0.15);
}
.toast-warning i { color: #eab308; }
.toast-warning .toast-progress { background: #eab308; }

.toast-info {
    border-color: rgba(247,35,94,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.7), 0 0 20px rgba(247,35,94,0.15);
}
.toast-info i { color: #f7235e; }
.toast-info .toast-progress { background: #f7235e; }

@keyframes toastIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

@media (max-width: 900px) {
    .toast-container {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        right: auto;
        bottom: auto;
        width: calc(100vw - 32px);
        max-width: 380px;
    }
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ============================
   INTERACTION NOTIFICATION
   ============================ */
.interaction-toast-viewport {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 47px);
    left: 50%;
    width: min(586px, calc(100vw - 58px));
    transform: translateX(-50%);
    z-index: 1000045;
    pointer-events: none;
}

.interaction-toast {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(255,255,255,.74);
    border-radius: 999px;
    background: rgba(235,246,252,.96);
    color: #111827;
    box-shadow: 0 18px 46px rgba(0,0,0,.26), 0 1px 0 rgba(255,255,255,.65) inset;
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 7px;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transform: translate3d(0, calc(-100% - 56px), 0);
    transition:
        opacity .28s ease,
        transform .44s cubic-bezier(.18,.88,.22,1);
    font-family: inherit;
    text-align: left;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform, opacity;
}

@keyframes interactionToastSlideDown {
    0% {
        opacity: 0;
        transform: translate3d(0, calc(-100% - 72px), 0);
    }
    72% {
        opacity: 1;
        transform: translate3d(0, 5px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes interactionToastSlideUp {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    100% {
        opacity: 0;
        transform: translate3d(0, calc(-100% - 72px), 0);
    }
}

.interaction-toast.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    animation: interactionToastSlideDown .48s cubic-bezier(.18,.88,.22,1) both;
}

.interaction-toast.is-hiding {
    opacity: 0;
    transform: translate3d(0, calc(-100% - 56px), 0);
    animation: interactionToastSlideUp .42s cubic-bezier(.45,0,.3,1) both;
}

.interaction-toast.is-dragging {
    cursor: grabbing;
    animation: none;
}

.interaction-toast.is-dismissed-by-drag {
    animation: none;
    pointer-events: none;
}

.interaction-toast-avatar-wrap {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.interaction-toast-avatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: block;
    object-fit: cover;
    background: linear-gradient(135deg,#f7235e,#ffb02e);
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}

.interaction-toast-type {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f7235e;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(235,246,252,.98);
    font-size: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.interaction-toast-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.interaction-toast-title-row {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.interaction-toast-title {
    min-width: 0;
    color: #111827;
    font-size: 15px;
    line-height: 1.15;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.interaction-toast-time {
    color: rgba(17,24,39,.58);
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.interaction-toast-desc {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.22;
    font-weight: 500;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.interaction-toast-chevron {
    display: none;
}

.interaction-toast--message .interaction-toast-type,
.interaction-toast--comment .interaction-toast-type,
.interaction-toast--like .interaction-toast-type,
.interaction-toast--heart .interaction-toast-type,
.interaction-toast--follow .interaction-toast-type,
.interaction-toast--mention .interaction-toast-type,
.interaction-toast--gift_received .interaction-toast-type,
.interaction-toast--gift_sent .interaction-toast-type {
    background: #8b5cf6;
}

@media (max-width: 600px) {
    .interaction-toast-viewport {
        top: calc(env(safe-area-inset-top, 0px) + 63px);
        width: calc(100vw - 48px);
    }

    .interaction-toast {
        min-height: 52px;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 9px;
        padding: 6px 12px 6px 7px;
        border-radius: 26px;
    }

    .interaction-toast-avatar-wrap,
    .interaction-toast-avatar {
        width: 40px;
        height: 40px;
    }

    .interaction-toast-avatar {
        border-radius: 14px;
    }

    .interaction-toast-title {
        font-size: 14px;
    }

    .interaction-toast-time {
        font-size: 12px;
    }

    .interaction-toast-desc {
        font-size: 13px;
    }
}

@media (min-width: 901px) {
    body.desktop-mode-mobile .interaction-toast-viewport {
        top: calc(env(safe-area-inset-top, 0px) + 67px);
        width: min(470px, calc(100vw - 50px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .interaction-toast {
        transition:
            opacity .28s ease,
            transform .44s cubic-bezier(.18,.88,.22,1);
    }
}

/* ============================
   REALTIME BADGES (SSE)
   ============================ */
.realtime-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--btn-pink);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-main);
    animation: badgePulse 0.3s ease;
    z-index: 5;
}

@keyframes badgePulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================
   LIGHTBOX DE FOTO
   ============================ */
#photoLightbox {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 99999 !important;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

.lightbox-inner img {
    max-width: min(90vw, 1200px);
    max-height: calc(100vh - 80px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    animation: fadeIn 0.2s ease;
    display: block;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
}

/* Botão Voltar — canto inferior direito do lightbox */
.lightbox-back {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #555555;
    border: none;
    color: #FFD700;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 9px 18px;
    border-radius: 24px;
    letter-spacing: 0.3px;
    transition: background 0.2s ease;
    z-index: 1002;   /* acima do lightbox (1001) e da nav mobile (1000) */
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.lightbox-back:hover {
    background: #444444;
}
.lightbox-back i {
    font-size: 14px;
    color: #FFD700;
}

/* Mobile: eleva o botão acima da barra de navegação inferior (~70px) */
@media (max-width: 900px) {
    .lightbox-back {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* ── Video Lightbox ── */
.video-lightbox-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    max-width: 860px;
    padding: 0 12px;
    box-sizing: border-box;
    pointer-events: none; /* clique fora fecha; inner captura o do vídeo */
}

.video-lightbox-player {
    pointer-events: all;
    width: auto;
    height: auto;
    max-width: min(860px, 96vw);
    max-height: 85vh;
    border-radius: 12px;
    background: #000;
    outline: none;
    object-fit: contain;
    display: block;
}

/* Mobile: lightbox cobre a nav (z:1001 > nav:1000)
   Reserva: ~50px header + ~84px botão Voltar + 20px folga = ~154px */
@media (max-width: 768px) {
    .video-lightbox-inner {
        align-items: center;
        padding: 0;
    }

    .video-lightbox-player {
        max-width: 100vw;
        max-height: calc(100dvh - 154px);
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .video-lightbox-player {
        max-width: 100vw;
        max-height: calc(100dvh - 150px);
        border-radius: 6px;
    }
}

@media (max-width: 768px) {
    .lightbox-inner {
        padding: 16px 8px 8px;
    }

    .lightbox-inner img {
        max-width: 98vw;
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 480px) {
    .lightbox-inner img {
        max-width: 100vw;
        max-height: calc(100svh - 80px);
        border-radius: 0;
    }

    .lightbox-inner {
        padding: 12px 0 4px;
    }

    .lightbox-back {
        font-size: 14px;
    }
}

/* ============================
   SIDEBAR DIREITA — SALDO + PREMIUM
   ============================ */
.sr-wallet-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 12px 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sr-wallet-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    background: linear-gradient(135deg, #0a2e1a 0%, #0f4a28 55%, #0a3318 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: 10px;
    padding: 8px 16px;
    width: 100%;
    max-width: 220px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 14px rgba(52, 211, 153, 0.18);
    position: relative;
    overflow: hidden;
}

.sr-wallet-balance:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(52, 211, 153, 0.32), 0 0 0 1px rgba(250,204,21,0.18) inset;
    border-color: rgba(250, 204, 21, 0.45);
}

.sr-wallet-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(110, 231, 183, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sr-wallet-value {
    font-size: 15px;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.sr-premium-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #1a9e52, #17b85f);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 2px 10px rgba(29,185,84,.25);
}

.sr-premium-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #ffffff;
}

.sr-premium-btn .fa-shield {
    font-size: 13px;
}

.shield-dollar-sm {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 7px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

/* ============================
   POPUP ENVIAR PRESENTE — Global
   ============================ */
@keyframes sg-bounce {
    0%   { transform: translateY(0) scale(1); }
    30%  { transform: translateY(-8px) scale(1.06); }
    55%  { transform: translateY(-3px) scale(1.04); }
    75%  { transform: translateY(-6px) scale(1.05); }
    90%  { transform: translateY(-1px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}
.sg-gift-option {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.sg-gift-card {
    background: rgba(255,255,255,.05);
    border: 2px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 8px 6px;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 90px;
    box-sizing: border-box;
}
@media (hover: hover) {
    .sg-gift-card:not(.no-stock):hover {
        border-color: #f7235e;
        background: rgba(247,35,94,.1);
        animation: sg-bounce .5s cubic-bezier(.36,.07,.19,.97) both;
    }
}
.sg-gift-card.selected {
    border-color: #f7235e;
    background: rgba(247,35,94,.1);
    box-shadow: 0 0 0 3px rgba(247,35,94,.3);
}
.sg-gift-card.no-stock { cursor: default; }
.sg-gift-card .sg-icon { font-size: 1.6rem; margin-bottom: 4px; line-height: 1; }
.sg-gift-card .sg-name { font-size: 10px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.sg-gift-card .sg-qty  { font-size: 10px; font-weight: 800; }
.sg-buy-btn {
    width: 100%;
    min-height: 28px;
    padding: 5px 0;
    background: linear-gradient(135deg,#16a34a,#22c55e);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34,197,94,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}
.sg-buy-btn:hover { opacity: .85; }

#sendGiftOverlay.active { display: flex !important; }
#sendGiftOverlay.active #sendGiftPanel { transform: translateY(0) scale(1) !important; opacity: 1 !important; }

/* ============================
   BOTÃO ENVIAR PRESENTE — Pulso de atenção (feed, chat, perfil)
   ============================ */
@keyframes giftBtnPulse {
    0%   { box-shadow: 0 0 0 0 rgba(249,115,22,.75), 0 0 0 0 rgba(249,115,22,.4); }
    40%  { box-shadow: 0 0 0 7px rgba(249,115,22,.0), 0 0 12px 4px rgba(249,115,22,.5); }
    70%  { box-shadow: 0 0 0 12px rgba(249,115,22,.0), 0 0 18px 6px rgba(247,35,94,.3); }
    100% { box-shadow: 0 0 0 0 rgba(249,115,22,.0), 0 0 0 0 rgba(249,115,22,.0); }
}

.post-gift-btn,
.cr-gift-bar-btn,
.vis-gift-btn,
.vis-left-gift-btn {
    animation: giftBtnPulse 1.5s ease-in-out infinite !important;
}

/* ============================================================
   RESPONSIVIDADE MOBILE — TODOS OS POPUPS/MODAIS
   Cobre: modal-backdrop, ViewGiftPopup, SendGiftPopup,
          checkout (premium), post-menu, comments, lightboxes
   ============================================================ */
@media (max-width: 600px) {

    /* ── Modal genérico: vira bottom-sheet no mobile ── */
    .modal-backdrop {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .modal-content {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: calc(92dvh - env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
        margin: 0 !important;
    }

    .modal-header  { padding: 12px 14px !important; }
    .modal-body    { padding: 14px !important; }
    .modal-footer  { padding: 10px 14px !important; }

    /* ── Comments modal: tela cheia no mobile ── */
    .comments-modal .modal-content {
        max-height: 100dvh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
    }

    /* ── ViewGiftPopup — card interno responsivo ── */
    #viewGiftOverlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #viewGiftOverlay > div {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 22px 22px 0 0 !important;
        max-height: calc(92dvh - env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
    }

    /* ── SendGiftPopup — painel responsivo ── */
    #sendGiftOverlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #sendGiftPanel {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: calc(92dvh - env(safe-area-inset-bottom)) !important;
        padding-bottom: env(safe-area-inset-bottom) !important;
    }

    /* ── Checkout modal (premium pages) ── */
    #checkoutModal {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #checkoutModal > div {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 20px 16px calc(20px + env(safe-area-inset-bottom)) !important;
        max-height: calc(90dvh - env(safe-area-inset-bottom)) !important;
        overflow-y: auto !important;
    }

    /* ── Post menu sheet ── */
    .post-menu-sheet {
        max-width: 100% !important;
        margin-bottom: 0 !important;
        padding: 0 0 env(safe-area-inset-bottom) !important;
    }

    /* ── Lightbox foto/vídeo ── */
    .lightbox-inner {
        padding: 52px 0 0 !important;
    }

    .lightbox-inner img,
    .lightbox-inner video {
        max-width: 100vw !important;
        max-height: calc(100svh - 52px) !important;
        border-radius: 0 !important;
    }

    /* ── MobileMenu popup sheet ── */
    #mobileMenuSheet {
        padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    }

    /* ── Toast: centralizado na tela ── */
    .toast-container {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        bottom: auto !important;
        right: auto !important;
    }
}
