/* ============================================
   LoveConnect Template v1.8.0 — Modern Dating App
   Mobile-First Responsive Design with Theme Support
   ============================================ */

/* NOTE: CSS Custom Properties are defined in themes.css */
/* This file uses variables from the theme system */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--lc-font-family);
    font-size: var(--lc-font-size-base);
    line-height: 1.5;
    color: var(--lc-text-primary);
    background: var(--lc-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    min-height: 100dvh;
    overscroll-behavior-y: contain;
    padding-top: var(--lc-safe-area-top);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--lc-font-headings, var(--lc-font-family));
}

a { color: var(--lc-brand-primary); text-decoration: none; transition: color var(--lc-transition-base) var(--lc-ease-in-out); }
a:hover { color: var(--lc-brand-primary-hover); }
a:active { opacity: 0.8; }

img { max-width: 100%; height: auto; display: block; }

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--lc-brand-primary);
    outline-offset: 2px;
    border-radius: var(--lc-radius-sm);
}

/* --- Header --- */
.lc-header {
    position: sticky;
    top: 0;
    z-index: var(--lc-z-fixed);
    background: var(--lc-bg-secondary);
    border-bottom: 1px solid var(--lc-border-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding-top: var(--lc-safe-area-top);
    box-shadow: var(--lc-shadow-sm);
}

.lc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--lc-header-height);
    padding: 0 var(--lc-space-4);
    max-width: 1200px;
    margin: 0 auto;
}

.lc-logo {
    display: flex;
    align-items: center;
    gap: var(--lc-space-2);
    text-decoration: none;
    color: var(--lc-text-primary);
    font-weight: 800;
    font-size: var(--lc-font-size-xl);
}

.lc-logo:hover { color: var(--lc-text-primary); }

.lc-logo-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.lc-logo-text {
    background: var(--lc-brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lc-logo-img {
    height: 32px;
    width: auto;
}

.lc-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--lc-space-2);
}

.lc-header-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--lc-radius-full);
    color: var(--lc-text-secondary);
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    border: none;
    background: transparent;
}

.lc-header-btn:hover {
    background: var(--lc-brand-primary-light);
    color: var(--lc-brand-primary);
}

.lc-badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--lc-brand-primary);
    border-radius: var(--lc-radius-full);
    border: 2px solid var(--lc-bg-secondary);
    animation: lc-pulse 2s infinite;
}

@keyframes lc-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* --- Main Content --- */
.lc-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--lc-space-4);
    padding-left: max(var(--lc-space-4), var(--lc-safe-area-left));
    padding-right: max(var(--lc-space-4), var(--lc-safe-area-right));
    min-height: calc(100vh - var(--lc-header-height) - var(--lc-nav-height) - 80px);
    min-height: calc(100dvh - var(--lc-header-height) - var(--lc-nav-height) - 80px);
    padding-bottom: calc(var(--lc-nav-height) + var(--lc-safe-area-bottom) + var(--lc-space-4));
}

.lc-main-section {
    margin-bottom: var(--lc-space-6);
}

/* --- Bottom Navigation --- */
.lc-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--lc-z-fixed);
    background: var(--lc-nav-bg);
    border-top: 1px solid var(--lc-border-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--lc-nav-height);
    padding-bottom: var(--lc-safe-area-bottom);
    padding-left: var(--lc-safe-area-left);
    padding-right: var(--lc-safe-area-right);
    box-shadow: var(--lc-nav-shadow);
}

.lc-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 56px;
    min-height: 44px;
    padding: 6px 12px;
    color: var(--lc-nav-inactive);
    text-decoration: none;
    transition: color var(--lc-transition-base) var(--lc-ease-in-out);
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.lc-nav-item:hover,
.lc-nav-item:active {
    color: var(--lc-nav-active);
}

.lc-nav-item.active {
    color: var(--lc-nav-active);
}

.lc-nav-item.active .lc-nav-svg {
    stroke-width: 2.5;
}

.lc-nav-svg {
    width: 24px;
    height: 24px;
    transition: transform var(--lc-transition-base) var(--lc-ease-out);
}

.lc-nav-item:active .lc-nav-svg {
    transform: scale(0.9);
}

.lc-nav-label {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.lc-nav-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background: var(--lc-brand-primary);
    color: var(--lc-text-inverse);
    border-radius: var(--lc-radius-full);
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--lc-bg-secondary);
    animation: lc-badge-pop 0.3s var(--lc-ease-out);
}

@keyframes lc-badge-pop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* --- Buttons --- */
.lc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--lc-space-2);
    padding: 12px 24px;
    font-weight: 600;
    font-size: var(--lc-font-size-base);
    border-radius: var(--lc-radius-full);
    cursor: pointer;
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 44px;
    text-decoration: none;
    border: none;
    line-height: 1.2;
}

.lc-btn:active { transform: scale(0.97); }

.lc-btn-primary {
    background: var(--lc-brand-gradient);
    color: var(--lc-text-inverse);
    box-shadow: 0 4px 14px rgba(233, 30, 99, 0.25);
}

.lc-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(233, 30, 99, 0.35);
    transform: translateY(-1px);
    color: var(--lc-text-inverse);
}

.lc-btn-secondary {
    background: var(--lc-brand-primary-light);
    color: var(--lc-brand-primary);
}

.lc-btn-secondary:hover { background: var(--lc-brand-primary-light); color: var(--lc-brand-primary-hover); }

.lc-btn-outline {
    background: transparent;
    color: var(--lc-brand-primary);
    border: 2px solid var(--lc-brand-primary);
}

.lc-btn-outline:hover { background: var(--lc-brand-primary-light); }

.lc-btn-ghost {
    background: transparent;
    color: var(--lc-text-secondary);
}

.lc-btn-ghost:hover { background: var(--lc-border-light); color: var(--lc-text-primary); }

.lc-btn-sm { padding: 8px 16px; font-size: var(--lc-font-size-sm); min-height: 36px; }
.lc-btn-lg { padding: 16px 32px; font-size: var(--lc-font-size-lg); min-height: 52px; }
.lc-btn-block { width: 100%; }
.lc-btn-icon { width: 44px; height: 44px; padding: 0; border-radius: var(--lc-radius-full); }

/* --- Footer --- */
.lc-footer {
    text-align: center;
    padding: var(--lc-space-8) var(--lc-space-4);
    color: var(--lc-text-tertiary);
    font-size: var(--lc-font-size-sm);
}

/* --- Form inputs --- */
.lc-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--lc-bg-secondary);
    border: 2px solid var(--lc-border);
    border-radius: var(--lc-radius);
    font-size: var(--lc-font-size-base);
    color: var(--lc-text-primary);
    transition: border-color var(--lc-transition-base) var(--lc-ease-in-out), box-shadow var(--lc-transition-base) var(--lc-ease-in-out);
    min-height: 48px;
    -webkit-appearance: none;
    appearance: none;
}

.lc-input:focus {
    border-color: var(--lc-brand-primary);
    box-shadow: 0 0 0 3px var(--lc-brand-primary-light);
}

.lc-input::placeholder { color: var(--lc-text-tertiary); }

.lc-label {
    display: block;
    font-weight: 600;
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text-secondary);
    margin-bottom: var(--lc-space-1);
}

/* --- Joomla system messages (modern toast) --- */
#system-message-container {
    position: fixed;
    top: calc(var(--lc-nav-height, 56px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 480px;
    pointer-events: none;
}

#system-message-container > * {
    pointer-events: auto;
}

/* Hide the type label ("success", "error" etc) — Joomla wraps it in various ways */
#system-message-container .alert-heading,
#system-message-container h4,
#system-message-container joomla-alert > div[slot="heading"],
#system-message-container .visually-hidden {
    display: none !important;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.92);
    color: var(--lc-text-primary, #333);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 4px solid var(--lc-brand-primary, #E91E63);
    margin-bottom: 8px;
    animation: lc-toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Icons removed — clean toast design (W-FIX-326) */
.alert::before {
    display: none !important;
}

.alert-success {
    border-left-color: #10B981;
}
/* icon removed W-FIX-326 */

.alert-message, .alert-info {
    border-left-color: #3B82F6;
}
/* icon removed W-FIX-326 */

.alert-error, .alert-danger {
    border-left-color: #EF4444;
}
/* icon removed W-FIX-326 */

.alert-warning {
    border-left-color: #F59E0B;
}
/* icon removed W-FIX-326 */

/* Close button */
.alert .btn-close,
.alert .close,
.alert button[data-bs-dismiss],
.alert button[aria-label="Close"] {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--lc-text-secondary, #999);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.alert .btn-close:hover,
.alert .close:hover,
.alert button[data-bs-dismiss]:hover,
.alert button[aria-label="Close"]:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Night mode */
[data-theme="night"] .alert {
    background: rgba(30, 30, 46, 0.92);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="night"] .alert .btn-close:hover,
[data-theme="night"] .alert .close:hover,
[data-theme="night"] .alert button[data-bs-dismiss]:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Toast animations */
@keyframes lc-toast-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lc-toast-out {
    from { opacity: 1; transform: translateY(0); max-height: 200px; margin-bottom: 8px; }
    to { opacity: 0; transform: translateY(-10px); max-height: 0; margin-bottom: 0; padding: 0; overflow: hidden; }
}

.alert.lc-toast-dismiss {
    animation: lc-toast-out 0.4s ease forwards;
}

/* --- Utilities --- */
.lc-text-center { text-align: center; }
.lc-text-muted { color: var(--lc-text-tertiary); }
.lc-mt-md { margin-top: var(--lc-space-4); }
.lc-mb-md { margin-bottom: var(--lc-space-4); }
.lc-hidden { display: none !important; }

/* --- Loading spinner --- */
.lc-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--lc-border);
    border-top-color: var(--lc-brand-primary);
    border-radius: 50%;
    animation: lc-spin 0.6s linear infinite;
}

.lc-spinner-lg { width: 40px; height: 40px; border-width: 4px; }

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

.lc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--lc-space-4);
    padding: var(--lc-space-16);
    color: var(--lc-text-tertiary);
}

/* --- Empty state --- */
.lc-empty {
    text-align: center;
    padding: var(--lc-space-16) var(--lc-space-4);
    color: var(--lc-text-tertiary);
}

.lc-empty-icon { font-size: 3.5rem; margin-bottom: var(--lc-space-4); display: block; }
.lc-empty h2 { font-size: var(--lc-font-size-xl); color: var(--lc-text-primary); margin-bottom: var(--lc-space-2); }
.lc-empty p { margin-bottom: var(--lc-space-6); line-height: 1.6; }

/* --- Avatar --- */
.lc-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--lc-radius-full);
    object-fit: cover;
    background: var(--lc-brand-primary-light);
    flex-shrink: 0;
}

.lc-avatar-sm { width: 36px; height: 36px; }
.lc-avatar-lg { width: 64px; height: 64px; }
.lc-avatar-xl { width: 96px; height: 96px; }

.lc-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--lc-brand-primary);
}

/* --- Skeleton loading --- */
.lc-skeleton {
    background: linear-gradient(90deg, var(--lc-border-light) 25%, var(--lc-border) 50%, var(--lc-border-light) 75%);
    background-size: 200% 100%;
    animation: lc-shimmer 1.5s infinite;
    border-radius: var(--lc-radius-sm);
}

@keyframes lc-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* --- Pull to refresh indicator --- */
.lc-pull-indicator {
    text-align: center;
    padding: var(--lc-space-4);
    color: var(--lc-text-tertiary);
    font-size: var(--lc-font-size-sm);
}

/* --- Desktop adjustments --- */
@media (min-width: 768px) {
    .lc-bottom-nav { display: none; }

    .lc-main {
        padding-bottom: var(--lc-space-8);
    }

    .lc-footer { margin-bottom: 0; }
}

@media (min-width: 1024px) {
    .lc-topbar { padding: 0 var(--lc-space-8); }
    .lc-main { padding: var(--lc-space-8); }
}

/* --- Social Links --- */
.lc-social-links {
    display: flex;
    justify-content: center;
    gap: var(--lc-space-4);
    margin: var(--lc-space-4) 0;
}

.lc-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--lc-radius-full);
    background: var(--lc-border-light);
    color: var(--lc-text-secondary);
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
}

.lc-social-link:hover {
    background: var(--lc-brand-primary-light);
    color: var(--lc-brand-primary);
    transform: translateY(-2px);
}

/* --- Footer Links --- */
.lc-footer-links {
    margin: var(--lc-space-2) 0;
    font-size: var(--lc-font-size-sm);
}

.lc-footer-links a {
    color: var(--lc-text-tertiary);
    transition: color var(--lc-transition-base);
}

.lc-footer-links a:hover { color: var(--lc-brand-primary); }

.lc-footer-sep {
    margin: 0 var(--lc-space-2);
    color: var(--lc-border);
}

.lc-footer-custom {
    margin-bottom: var(--lc-space-4);
    line-height: 1.6;
}

.lc-copyright {
    font-size: var(--lc-font-size-xs);
    color: var(--lc-text-tertiary);
    margin-top: var(--lc-space-2);
}

/* --- Back to Top --- */
.lc-back-to-top {
    position: fixed;
    bottom: calc(var(--lc-nav-height) + var(--lc-safe-area-bottom) + 16px);
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: var(--lc-radius-full);
    background: var(--lc-bg-secondary);
    color: var(--lc-brand-primary);
    box-shadow: var(--lc-shadow-md);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--lc-z-sticky);
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
}

.lc-back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--lc-shadow-lg);
}

@media (min-width: 768px) {
    .lc-back-to-top { bottom: 24px; right: 24px; }
}

/* --- Cookie Banner --- */
.lc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--lc-bg-secondary);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
    padding: var(--lc-space-4) var(--lc-space-6);
    padding-bottom: max(var(--lc-space-4), var(--lc-safe-area-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--lc-space-4);
    z-index: var(--lc-z-modal-backdrop);
    font-size: var(--lc-font-size-sm);
    animation: lc-slide-up 0.3s var(--lc-ease-in-out);
}

.lc-cookie-banner p { margin: 0; color: var(--lc-text-secondary); }

@keyframes lc-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (max-width: 600px) {
    .lc-cookie-banner { flex-direction: column; text-align: center; }
}

/* --- No animations mode --- */
.lc-no-anim *, .lc-no-anim *::before, .lc-no-anim *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
}

/* --- Theme-specific adjustments --- */
[data-theme="night"] .lc-boxed { background: var(--lc-bg-primary); }
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .lc-boxed { background: var(--lc-bg-primary); }
}

/* --- Modern Dating App Enhancements --- */
.lc-page-title {
    font-size: var(--lc-font-size-2xl);
    font-weight: 800;
    color: var(--lc-text-primary);
    margin-bottom: var(--lc-space-6);
    text-align: center;
}

.lc-filter-bar {
    position: sticky;
    top: var(--lc-header-height);
    background: var(--lc-bg-primary);
    padding: var(--lc-space-3) 0;
    margin: 0 calc(-1 * var(--lc-space-4));
    padding-left: var(--lc-space-4);
    padding-right: var(--lc-space-4);
    z-index: var(--lc-z-sticky);
    border-bottom: 1px solid var(--lc-border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lc-filter-pills {
    display: flex;
    gap: var(--lc-space-2);
    overflow-x: auto;
    padding-bottom: var(--lc-space-1);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lc-filter-pills::-webkit-scrollbar {
    display: none;
}

.lc-filter-pill {
    flex-shrink: 0;
    padding: var(--lc-space-2) var(--lc-space-4);
    background: var(--lc-filter-inactive-bg);
    color: var(--lc-filter-inactive-text);
    border: 1px solid var(--lc-filter-border);
    border-radius: var(--lc-radius-full);
    font-size: var(--lc-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
    text-decoration: none;
    white-space: nowrap;
}

.lc-filter-pill:hover,
.lc-filter-pill.active {
    background: var(--lc-filter-active-bg);
    color: var(--lc-filter-active-text);
    border-color: var(--lc-filter-active-bg);
}

.lc-load-more {
    text-align: center;
    padding: var(--lc-space-8) 0;
}

.lc-theme-selector {
    display: flex;
    background: var(--lc-bg-tertiary);
    border-radius: var(--lc-radius-lg);
    padding: var(--lc-space-1);
    gap: var(--lc-space-1);
}

.lc-theme-option {
    flex: 1;
    padding: var(--lc-space-2) var(--lc-space-3);
    border-radius: var(--lc-radius);
    font-size: var(--lc-font-size-sm);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--lc-transition-base) var(--lc-ease-in-out);
    color: var(--lc-text-secondary);
    background: transparent;
    border: none;
}

.lc-theme-option.active {
    background: var(--lc-bg-secondary);
    color: var(--lc-text-primary);
    box-shadow: var(--lc-shadow-sm);
}
