/* AONETAX Social Media page — simple gallery + register-style popup */
:root {
    --blue-header: #1a5278;
    --blue-light: #e8f4fc;
    --blue-btn-grad: linear-gradient(180deg, #256992 0%, #1a5278 100%);
    --border-blue: #6aadcf;
    --text-navy: #1a5278;
    --text-muted: #64748b;
    --white: #fff;
    --radius-lg: 16px;
    --radius-sm: 8px;
    --shadow-sm: 0 2px 8px rgba(26,82,120,0.08);
    --shadow-md: 0 6px 20px rgba(26,82,120,0.12);
    --page-w: 1100px;
}

.wrap { width: min(var(--page-w), 94%); margin: 0 auto; }

.social-page { padding: 28px 0 56px; }

.social-profile {
    background: var(--white);
    border: 2px solid rgba(106,173,207,0.35);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-profile__avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid var(--border-blue);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--blue-light);
}

.social-profile__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-profile__info { flex: 1; min-width: 200px; }

.social-profile__info h1,
.social-profile__info h2,
.social-profile__info .social-profile__name {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-navy);
    margin-bottom: 2px;
}

.social-profile__handle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.social-profile__bio {
    font-size: 14px;
    color: #334155;
    max-width: 480px;
}

.social-profile__stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.social-profile__stats span {
    font-size: 14px;
    color: var(--text-muted);
}

.social-profile__stats strong {
    display: block;
    font-size: 18px;
    font-weight: 900;
    color: var(--text-navy);
}

.social-section-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-navy);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-section-title i { color: var(--border-blue); }

/* Media grid */
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.media-grid__item {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #e2e8f0;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.media-grid__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.media-grid__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.media-grid__item:hover img { transform: scale(1.06); }

.media-grid__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(26, 82, 120, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    pointer-events: none;
}

.media-grid__badge--photo { background: rgba(255,255,255,0.9); color: var(--text-navy); }

/* Media viewer — same shell as register / SweetAlert popup */
.form-modal__box--media {
    width: min(640px, 100%);
}

.media-modal__stage {
    border: 1.5px solid #c5d8e6;
    border-radius: var(--radius-sm);
    background: var(--input-bg, #f4f7fa);
    overflow: hidden;
    min-height: 220px;
    max-height: min(52vh, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.media-modal__stage img,
.media-modal__stage video,
.media-modal__stage iframe {
    display: none;
    max-width: 100%;
    max-height: min(52vh, 420px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.media-modal__stage img.is-visible,
.media-modal__stage video.is-visible,
.media-modal__stage iframe.is-visible {
    display: block;
}

.media-modal__stage iframe {
    width: 100%;
    min-height: min(52vh, 420px);
    border: 0;
    background: #000;
}

.media-modal__stage video {
    width: 100%;
    background: #000;
}

.media-modal__caption {
    font-size: 14px;
    color: #334155;
    line-height: 1.45;
    margin: 0 0 4px;
    text-align: left;
}

.media-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.media-modal__btn {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.18s, transform 0.18s;
}

.media-modal__btn:hover { opacity: 0.92; transform: translateY(-1px); }

.media-modal__btn--primary {
    background: #1a5278;
    color: #fff;
}

.media-modal__btn--cancel {
    background: #6e7881;
    color: #fff;
}

.media-modal__nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8eef3;
}

.media-modal__link {
    background: none;
    border: none;
    color: var(--text-navy);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    font-family: inherit;
}

.media-modal__link:hover { text-decoration: underline; }

.media-modal__counter {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .media-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
    .social-profile { flex-direction: column; text-align: center; }
    .social-profile__stats { justify-content: center; }
    .media-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .media-modal__actions { flex-direction: column; }
    .media-modal__btn { width: 100%; }
}
