.favorites-section {
    min-height: 48vh;
}

.favorites-heading {
    margin-bottom: 1.25rem;
}

.favorites-subtitle {
    color: var(--muted);
    margin: .4rem 0 0;
    font-size: .85rem;
}

.favorites-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1rem;
}

.favorites-clear-button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
}

.favorites-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.favorites-modal {
    position: relative;
    width: min(100%, 430px);
    padding: 2rem 1.35rem 1.25rem;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
    animation: favorites-modal-in .16s ease-out;
}

.favorites-modal-close {
    position: absolute;
    top: .7rem;
    left: .7rem;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.favorites-modal-close:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.favorites-modal-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto .9rem;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--danger);
    font-size: 1.35rem;
}

.favorites-modal h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
}

.favorites-modal p {
    margin: .65rem auto 1.25rem;
    max-width: 340px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.9;
}

.favorites-modal-actions {
    display: flex;
    justify-content: center;
    gap: .6rem;
}

.favorites-modal-actions .btn {
    min-width: 112px;
    font-size: .8rem;
    font-weight: 700;
}

@keyframes favorites-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.favorites-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .8rem;
    min-height: 260px;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 18px;
}

.favorites-state > i {
    color: var(--primary);
    font-size: 2.2rem;
}

.favorites-state-empty strong {
    color: var(--ink);
    font-size: 1rem;
}

.favorites-state-empty span {
    max-width: 420px;
    font-size: .82rem;
}

.favorites-state-error > i {
    color: var(--danger);
}

.favorites-grid .adv {
    height: 100%;
}

.favorite-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.favorite-toggle.active {
    background: var(--danger);
    border-color: var(--danger);
}

.spin {
    animation: favorites-spin .9s linear infinite;
}

@keyframes favorites-spin {
    to { transform: rotate(360deg); }
}
