/**
 * jea.explore.css — Styles for Explore Issues and Explore Amenities pages.
 *
 * @copyright  Copyright (C) 2026 ReCreating Anew (by GinA). All rights reserved.
 * @license    GNU General Public License version 2 or later
 */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */

.jea-explore-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.jea-explore-page__header {
    margin-bottom: 2rem;
    text-align: center;
}

.jea-explore-page__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.jea-explore-page__desc {
    font-size: 1.1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 0.75rem;
}

.jea-explore-page__summary {
    font-size: 0.95rem;
    color: #777;
    font-style: italic;
}

.jea-explore-page__empty {
    text-align: center;
    color: #888;
    padding: 3rem 1rem;
    font-size: 1.1rem;
}

.jea-explore-page__footer {
    margin-top: 2.5rem;
    text-align: center;
}

/* ── Category grid ────────────────────────────────────────────────────────── */

.jea-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ── Category card ────────────────────────────────────────────────────────── */

.jea-category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.jea-category-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.jea-category-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    padding: 1.25rem;
    gap: 0.75rem;
}

.jea-category-card__link:hover {
    text-decoration: none;
    color: inherit;
}

/* Icon circle, color driven by CSS custom property */
.jea-category-card__icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--jea-cat-color, #555) 15%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jea-category-card__icon {
    font-size: 1.35rem;
    color: var(--jea-cat-color, #555);
}

.jea-category-card__body {
    flex: 1;
}

.jea-category-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: #1a1a1a;
}

.jea-category-card__desc {
    font-size: 0.875rem;
    color: #666;
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.jea-category-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.jea-category-card__stat {
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    font-weight: 500;
}

.jea-category-card__stat--issues {
    background: #fef3cd;
    color: #856404;
}

.jea-category-card__stat--props {
    background: #d1ecf1;
    color: #0c5460;
}

.jea-category-card__stat--amenities {
    background: #d4edda;
    color: #155724;
}

.jea-category-card__stat--none {
    background: #f8f9fa;
    color: #868e96;
}

.jea-category-card__cta {
    font-size: 0.82rem;
    color: var(--jea-cat-color, #555);
    font-weight: 600;
    margin-top: auto;
}

/* Issue vs amenity tint on card top border */
.jea-category-card--issue {
    border-top: 3px solid #e74c3c;
}

.jea-category-card--amenity {
    border-top: 3px solid #27ae60;
}

/* ── Alerts page ──────────────────────────────────────────────────────────── */

.jea-alerts-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.jea-alerts-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.jea-alerts-page__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jea-alerts-page__nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.jea-alerts-page__actions {
    margin-bottom: 1rem;
}

.jea-alerts-page__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
    font-size: 1.05rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.jea-alerts-page__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.jea-alerts-page__page-info {
    font-size: 0.9rem;
    color: #666;
}

/* Full-width alert list on alerts page */
.jea-alert-list--full .jea-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.jea-alert-list--full .jea-alert-item--unread {
    background: #f7f9ff;
    border-left: 3px solid #4a6cf7;
}

.jea-alert-list--full .jea-alert-item__body {
    flex: 1;
    min-width: 0;
}

.jea-alert-list--full .jea-alert-item__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-shrink: 0;
}

.jea-alert-item__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #cbd5e0;
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.jea-alert-item--unread .jea-alert-item__dot {
    background: #4a6cf7;
}

.jea-alert-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.jea-alert-item__event-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.jea-alert-item__prop {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3748;
}

.jea-alert-item__message {
    font-size: 0.9rem;
    margin: 0 0 0.3rem;
    color: #4a5568;
}

.jea-alert-item__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #a0aec0;
}

.jea-alert-item__reason {
    cursor: help;
    text-decoration: underline dotted;
}

/* Follow property widget on property page */
.jea-follow-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    flex-wrap: wrap;
}

.jea-follow-btn {
    min-width: 140px;
}

.jea-follow-btn--active {
    background: #4a6cf7;
    border-color: #4a6cf7;
    color: #fff;
}

.jea-follow-settings-btn {
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.jea-follow-settings-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.jea-follow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 4px;
}

/* Alert badge (unread count) */
.jea-alerts-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1;
}

.jea-alerts-badge--inline {
    vertical-align: middle;
}

/* Manage Alerts Modal */
.jea-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.jea-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.jea-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.jea-modal__box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    margin: 1rem;
}

.jea-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.jea-modal__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.jea-modal__close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    line-height: 1;
}

.jea-modal__body {
    padding: 1.25rem;
}

.jea-modal__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.jea-alert-section {
    margin-bottom: 1.25rem;
}

.jea-alert-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.jea-alert-presets {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.jea-alert-preset {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.jea-alert-preset--active {
    background: #4a6cf7;
    border-color: #4a6cf7;
    color: #fff;
}

.jea-alert-preset-desc {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0.5rem 0 0;
}

.jea-alert-group {
    margin-bottom: 1rem;
}

.jea-alert-group-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.jea-alert-group-name {
    font-size: 0.88rem;
    font-weight: 600;
}

.jea-alert-owner-badge {
    font-size: 0.7rem;
    background: #fef9c3;
    color: #854d0e;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-weight: 600;
}

.jea-alert-event-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    padding: 0.2rem 0;
    cursor: pointer;
}
