/**
 * ──────────────────────────────────────────────────────────────
 *  Folhas do Hábito — Iniciativa C2
 *  Modo Descanso
 * ──────────────────────────────────────────────────────────────
 */

/* ═══════════════════════════════════════════
   BADGE ATIVO — "🌙 Modo Descanso"
   ═══════════════════════════════════════════ */
.rest-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(30, 24, 40, 0.5), rgba(20, 16, 32, 0.35));
    border: 1px solid rgba(168, 130, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    animation: rest-badge-glow 4s ease-in-out infinite;
}
@keyframes rest-badge-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(168, 130, 255, 0); }
    50%      { box-shadow: 0 0 14px rgba(168, 130, 255, 0.08); }
}
.rest-badge-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}
.rest-badge-content {
    flex: 1;
    min-width: 0;
}
.rest-badge-title {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: rgba(216, 180, 254, 0.9);
    font-weight: 600;
    margin-bottom: 2px;
}
.rest-badge-sub {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}
.rest-badge-cancel {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rest-badge-cancel:hover {
    border-color: rgba(252, 165, 165, 0.4);
    color: rgba(252, 165, 165, 0.8);
    background: rgba(252, 165, 165, 0.06);
}

/* ═══════════════════════════════════════════
   BOTÃO DE ATIVAÇÃO — "🌙 Descansar"
   ═══════════════════════════════════════════ */
.rest-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    padding: 7px 14px;
    background: rgba(168, 130, 255, 0.06);
    border: 1px solid rgba(168, 130, 255, 0.15);
    border-radius: 9px;
    color: rgba(216, 180, 254, 0.6);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rest-trigger:hover {
    background: rgba(168, 130, 255, 0.12);
    border-color: rgba(168, 130, 255, 0.3);
    color: rgba(216, 180, 254, 0.9);
    transform: translateY(-1px);
}
.rest-trigger-icon {
    font-size: 1rem;
    line-height: 1;
}
.rest-trigger[disabled] {
    opacity: 0.35;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   FORMULÁRIO DE ATIVAÇÃO (inline)
   ═══════════════════════════════════════════ */
.rest-form {
    margin: 10px 0;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(30, 24, 40, 0.5), rgba(20, 16, 32, 0.35));
    border: 1px solid rgba(168, 130, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    animation: rest-form-in 0.3s ease-out;
}
@keyframes rest-form-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rest-form[hidden] { display: none; }

.rest-form-title {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: rgba(216, 180, 254, 0.85);
    margin-bottom: 12px;
    font-weight: 600;
}
.rest-form-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.rest-form-days {
    display: flex;
    gap: 6px;
}
.rest-form-day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(168, 130, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rest-form-day:hover {
    border-color: rgba(168, 130, 255, 0.4);
    color: rgba(216, 180, 254, 0.9);
    background: rgba(168, 130, 255, 0.1);
}
.rest-form-day.is-selected {
    border-color: rgba(168, 130, 255, 0.6);
    color: #d8b4fe;
    background: rgba(168, 130, 255, 0.2);
    box-shadow: 0 0 8px rgba(168, 130, 255, 0.15);
}
.rest-form-confirm {
    padding: 8px 18px;
    background: rgba(168, 130, 255, 0.15);
    border: 1px solid rgba(168, 130, 255, 0.35);
    border-radius: 9px;
    color: #d8b4fe;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rest-form-confirm:hover {
    background: rgba(168, 130, 255, 0.25);
    border-color: rgba(168, 130, 255, 0.55);
    transform: translateY(-1px);
}
.rest-form-cancel {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rest-form-cancel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
}
.rest-form-info {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 10px;
    line-height: 1.5;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rest-badge {
        animation-duration: 0.1s !important;
    }
}
