/* ================================================================
   ESTILO STORIES PREMIUM
   ================================================================ */

.reviews-section {
    padding: 100px 0;
    background-color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.reviews-story-wrapper {
    display: flex;
    align-items: center;
    gap: 80px;
    flex-wrap: wrap;
}

/* TEXTO FIXO (ESQUERDA) */
.reviews-fixed-content {
    flex: 1;
    min-width: 300px;
}

.story-title {
    font-size: 2.8rem;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-blue { color: #6366f1; }

.story-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* BREAKDOWN DE ESTRELAS */
.rating-breakdown {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-bar-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    width: 22px;
    text-align: right;
    flex-shrink: 0;
}

.rating-bar-track {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-bar-pct {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

/* CARD AZUL (DIREITA) */
.reviews-story-card {
    flex: 1.5;
    min-width: 340px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 24px;
    padding: 40px 44px;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
    position: relative;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* BARRAS DE PROGRESSO (CONECTADO AO JS) */
.story-progress-container {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.story-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    /* A transição é controlada pelo JS, por isso não colocamos aqui */
}

/* ESTRELAS AMARELAS (CONECTADO AO JS) */
#stars-container {
    color: #fbbf24; /* COR AMARELA FIXA */
    font-size: 1.3rem;
    margin-bottom: 20px;
    letter-spacing: 3px;
    display: block;
}

/* TEXTO DO DEPOIMENTO (CONECTADO AO JS) */
#review-text {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 25px 0;
    min-height: 100px;
    transition: opacity 0.3s ease; /* Para o efeito de fade do JS */
}

/* RODAPÉ DO CARD */
.story-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.author-dash { color: rgba(255, 255, 255, 0.6); font-weight: bold; }

#review-author {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .reviews-story-wrapper { flex-direction: column; text-align: center; }
    .story-title { font-size: 2.2rem; }
    .reviews-story-card { width: 100%; padding: 30px; }
}


.reviews-summary {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

#average-rating {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-color);
}

.summary-stars {
    color: #fbbf24;
    font-size: 1.2rem;
}

.summary-text {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ================================================================
   TOAST DE AVALIAÇÃO DO SISTEMA (app.html) — dark theme
   ================================================================ */

/* TOAST DE AVALIAÇÃO */
.avaliacao-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    background: linear-gradient(145deg, #1e2235, #252d45);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    z-index: 9990;
    animation: toastSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
    box-sizing: border-box;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

.avaliacao-toast.saindo {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(40px); }
}

.avaliacao-toast-fechar {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.avaliacao-toast-fechar:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.avaliacao-toast-icone {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: #fff;
}

.avaliacao-toast-titulo {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.avaliacao-toast-subtitulo {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin: 0 0 14px;
}

/* ESTRELAS */
.avaliacao-estrelas {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.estrela {
    font-size: 2rem;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    user-select: none;
}

.estrela:hover,
.estrela.ativa { color: #f59e0b; }

.estrela:hover { transform: scale(1.15); }

.avaliacao-label-estrelas {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    margin-bottom: 12px;
    min-height: 1.1em;
}

.avaliacao-textarea {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #fff;
    resize: none;
    max-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.avaliacao-textarea::placeholder { color: rgba(255,255,255,0.25); }

.avaliacao-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.avaliacao-contador {
    display: block;
    text-align: right;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
    margin: 3px 0 10px;
}

.avaliacao-msg {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.avaliacao-msg-erro {
    background: rgba(239,68,68,0.1);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.2);
}

.avaliacao-msg-sucesso {
    background: rgba(16,185,129,0.1);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.2);
}

.avaliacao-btn-enviar {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

.avaliacao-btn-enviar:hover { opacity: 0.9; transform: translateY(-1px); }
.avaliacao-btn-enviar:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.avaliacao-btn-dispensar {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
    padding: 4px;
    transition: color 0.2s;
}

.avaliacao-btn-dispensar:hover { color: rgba(255,255,255,0.6); }

/* MOBILE — bottom sheet */
@media (max-width: 768px) {
    .avaliacao-toast {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        animation: toastSlideInMobile 0.35s cubic-bezier(0.34,1.56,0.64,1);
    }

    @keyframes toastSlideInMobile {
        from { opacity: 0; transform: translateY(100%); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .avaliacao-toast.saindo {
        animation: toastSlideOutMobile 0.25s ease forwards;
    }

    @keyframes toastSlideOutMobile {
        from { opacity: 1; transform: translateY(0); }
        to   { opacity: 0; transform: translateY(100%); }
    }
}