﻿/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-medium);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-primary);
    color: #000;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: 0 0 0 0 rgba(var(--color-primary-rgb), 0);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    background: transparent;
    border-radius: var(--radius-full);
}

.btn-secondary:hover {
    border-color: var(--color-text-muted);
    background: rgba(0, 0, 0, 0.03);
    transform: translateY(-1px);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-ghost {
    color: var(--color-text-muted);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    color: var(--color-text-main);
    background-color: rgba(0, 0, 0, 0.04);
}

body.dark-mode .btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* ===== BADGES ===== */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background-color: rgba(var(--color-primary-rgb), 0.08);
    border: 1px solid rgba(var(--color-primary-rgb), 0.15);
    border-radius: var(--radius-full);
    color: var(--color-primary-hover);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 0.01em;
}

body.dark-mode .badge-pill {
    color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.1);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.6); }
    50% { box-shadow: 0 0 16px rgba(var(--color-primary-rgb), 0.9); }
}

/* ===== CARDS ===== */
.bg-card {
    background-color: var(--color-bg-card);
}

.feature-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-medium), border-color var(--transition-medium),
                box-shadow var(--transition-medium);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--color-primary-rgb), 0.3);
    box-shadow: 0 8px 30px rgba(var(--color-primary-rgb), 0.08);
}

.feature-icon {
    color: var(--color-primary);
    width: 32px;
    height: 32px;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-text-main);
    font-size: 1.2rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== AGENT CARDS ===== */
.agent-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    width: 280px;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-medium);
}

body.dark-mode .agent-card {
    background: rgba(26, 26, 31, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.agent-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-status span {
    color: var(--color-text-main);
}

.icon-success {
    color: var(--color-primary);
    width: 16px;
}

.icon-active {
    color: #3b82f6;
    animation: spin 3s linear infinite;
    width: 16px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer Social Media Icons */
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-social h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 9px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.social-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.social-icon.instagram svg {
    transform: translateY(1px) scale(1.1);
}

/* Footer Connect Section */
.footer-connect {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-connect h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-icon {
    width: 16px;
}

.contact-link {
color: var(--color-text-main);
text-decoration: none;
font-size: 0.9rem;
}

.contact-link:hover {
    color: var(--color-primary);
}

/* ===== LOGGED-IN PROFILE BUTTON STYLES ===== */
#start-spairr-btn.logged-in,
#mobile-login-trigger.logged-in {
    background: var(--color-primary) !important;
    color: var(--color-text-inverse) !important;
    border: none !important;
}

#start-spairr-btn.logged-in:hover,
#mobile-login-trigger.logged-in:hover {
    background: var(--color-primary-hover) !important;
}

/* ===== PROFILE MODAL STYLES ===== */
.profile-info {
    margin-bottom: 2rem;
}

.profile-field {
    margin-bottom: 1.5rem;
}

.profile-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-value {
    font-size: 1rem;
    color: var(--color-text-main);
    font-weight: 500;
}

.subscriptions-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 1rem;
}

.subscriptions-list {
    max-height: 300px;
    overflow-y: auto;
}

.subscription-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color var(--transition-medium);
}

.subscription-item:hover {
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

.subscription-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.subscription-agent {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0;
}

.subscription-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(52, 212, 1, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(52, 212, 1, 0.2);
}

.status-inactive {
    background: rgba(255, 159, 64, 0.1);
    color: #ff9f40;
    border: 1px solid rgba(255, 159, 64, 0.2);
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.subscription-dates {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subscription-dates small {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.loading-text,
.no-subscriptions,
.error-subscriptions {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-muted);
    font-style: italic;
}

.error-subscriptions {
    color: #ef4444;
}

.profile-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-medium);
    cursor: pointer;
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-1px);
}

.logout-icon {
    width: 16px;
    height: 16px;
}

/* ===== MODAL Z-INDEX FIXES ===== */
#login-modal {
    z-index: 10000 !important;
}

#onboarding-overlay {
    z-index: 9999;
}

/* ===== PROFILE MODAL (SCOPED ONLY) ===== */

.profile-modal-container {
    position: relative; /* CRITICAL FIX: ensures close button positions correctly */
    width: 90%;
    max-width: 1100px;
    height: 75vh;
    background: var(--color-bg-elevated);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

/* Layout */
.profile-layout {
    display: flex;
    height: 100%;
}

/* Sidebar */
.profile-sidebar {
    width: 240px;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.profile-heading {
    margin-bottom: 1rem;
    font-weight: 600;
}

.profile-tab {
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    color: var(--color-text-main);
}

.profile-tab:hover {
    background: rgba(var(--color-primary-rgb), 0.08);
}

.profile-tab.active {
    background: var(--color-primary);
    color: black;
}

/* Content */
.profile-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Cards */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.profile-card {
    background: var(--color-bg-card);
    padding: 1rem;
    border-radius: 12px;
}

.profile-card span {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.profile-card strong {
    display: block;
    color: var(--color-text-main);
    font-weight: 600;
}

/* Tabs visibility */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

.profile-tab-content h2 {
    margin-bottom: 1.5rem;
    color: var(--color-text-main);
}

/* Subscriptions */
.subscriptions-grid {
    display: grid;
    gap: 1rem;
}

/* SAFETY: prevent modal size override from global styles */
#profile-modal .modal-container {
    max-width: none !important;
}

/* ===== LOGOUT CONFIRM MODAL ===== */

.logout-confirm-container {
    position: relative;
    width: 400px;
    max-width: 90%;
    background: var(--color-bg-elevated);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.logout-confirm-container h3 {
    margin-bottom: 1rem;
    color: var(--color-text-main);
    font-weight: 600;
}

.logout-confirm-container p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.logout-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-danger {
    background: #e5484d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #d6363b;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--color-bg-card);
    border-color: var(--color-text-muted);
}

/* ===== SUBSCRIPTIONS ===== */
.subscription-card {
    border: 1px solid #eee;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status.active {
    color: green;
}

.status.expired {
    color: red;
}

.empty-state {
    text-align: center;
    color: #888;
}

/* ===== PROFILE UI ENHANCED ===== */

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    border-radius: 14px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.profile-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

.profile-header-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.profile-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.profile-info-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 14px;
    border-radius: 12px;
}

.profile-info-card span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.profile-info-card strong {
    display: block;
    margin-top: 4px;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.profile-status-active {
    color: #22c55e;
}

/* ===== SUBSCRIPTION UI ENHANCED ===== */

.subscription-card-enhanced {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.subscription-card-enhanced:hover {
    border-color: rgba(var(--color-primary-rgb), 0.4);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.08);
    transform: translateY(-2px);
}

.subscription-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subscription-agent-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-main);
}

.subscription-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-status-badge.active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.subscription-status-badge.expired {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.subscription-status-badge.inactive {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.subscription-dates-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.date-block {
    display: flex;
    flex-direction: column;
}

.date-block span {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.date-block strong {
    font-size: 0.9rem;
    color: var(--color-text-main);
}

.date-arrow {
    font-size: 1rem;
    color: var(--color-text-muted);
}

/* ===== CENTERED HORIZONTAL TOAST ===== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 260px;
    max-width: 340px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: white;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);

    transform: translateX(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #00c853, #00a843);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.toast-close {
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}

.dialog-box {
    text-align: center;
    padding: 2rem;
}

.dialog-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.dialog-message {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* ===== VIDEO TILE ===== */
.demo-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== VIDEO PLAYER ===== */

.video-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: auto;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: black;
    outline: 1px solid rgba(255,255,255,0.06); /* softer */
    transform: translateZ(0);
    will-change: transform;
}

/* LIGHT MODE */
body:not(.dark-mode) .video-container {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.05);
}

/* DARK MODE */
body.dark-mode .video-container {
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}

/* VIDEO */
.demo-video {
    width: 100%;
    height: 100%;
    display: block;

    border-radius: 20px;   /* ✅ match container */
}

/* OVERLAY */
.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.25);
    transition: opacity 0.3s ease;
}

/* PLAY BUTTON */
.video-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    font-size: 28px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: transform 0.2s ease;
}

/* LIGHT */
body:not(.dark-mode) .video-play-btn {
    background: rgba(255,255,255,0.9);
    color: black;
}

/* DARK */
body.dark-mode .video-play-btn {
    background: rgba(0,0,0,0.6);
    color: white;
}

.video-play-btn:hover {
    transform: scale(1.1);
}

/* HIDE OVERLAY WHEN PLAYING */
.video-container.playing .video-overlay {
    opacity: 0;
    pointer-events: none;
}

.video-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

    display: flex;              /* ✅ center content */
    align-items: center;        /* ✅ vertical center */
    justify-content: center;    /* ✅ horizontal center */

    font-size: 32px;            /* better proportion */
    line-height: 1;             /* remove vertical shift */

    backdrop-filter: blur(6px);
    transition: transform 0.2s ease;
}