/* App popup (replaces alert) */
.app-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.app-popup-overlay.app-popup-visible {
    opacity: 1;
    visibility: visible;
}
.app-popup-box {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.app-popup-message {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
}
.app-popup-close {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.app-popup-close:hover {
    background: var(--primary-dark);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* App popup (replaces alert) */
.app-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.app-popup-overlay.app-popup-visible {
    opacity: 1;
    visibility: visible;
}
.app-popup-box {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.app-popup-message {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
}
.app-popup-close {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.app-popup-close:hover {
    background: var(--primary-dark);
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.05);
    --shadow-lg: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Page header (create / reupload) */
.header.create-page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
}

.header .nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.header .nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header .nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.header .nav-link:hover {
    color: var(--primary);
}

.header .user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header .nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.header .nav-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .nav-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-container {
    display: flex;
    min-height: calc(100vh - 56px);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}

.sidebar {
    width: 280px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: none;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar-profile h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-cv-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.download-cv-icon-btn:hover {
    background: rgba(37, 99, 235, 0.1);
}

.download-cv-icon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-avatar {
    overflow: hidden;
    padding: 0;
}

.sidebar-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.upload-section {
    margin-bottom: 24px;
}

.upload-button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    justify-content: center;
}

.upload-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.upload-button:active {
    transform: translateY(0);
}

.file-info {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-all;
}

.file-status {
    font-size: 12px;
    color: var(--text-light);
}

.file-status.processing {
    color: var(--primary);
}

.file-status.ready {
    color: var(--success);
}

.progress-container {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.clear-button {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    justify-content: center;
}

.clear-button:hover {
    background: var(--bg);
    color: var(--text);
    border-color: var(--text-light);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 12px 0;
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cdc4' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.welcome-message h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.welcome-message p {
    font-size: 14px;
    color: var(--text-light);
}

.message {
    margin-bottom: 4px;
    animation: fadeIn 0.25s ease;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    flex-direction: row-reverse;
}

.message-assistant {
    flex-direction: row;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-user .message-avatar-fallback {
    background: #128c7e;
}

.message-content {
    max-width: 65%;
    padding: 8px 12px 10px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08);
}

.message-user .message-content {
    background: #dcf8c6;
    color: #111;
    border-bottom-right-radius: 2px;
}

.message-assistant .message-content {
    background: #fff;
    color: var(--text);
    border-bottom-left-radius: 2px;
}

.message-content--typing {
    min-width: 48px;
}

/* WhatsApp-style typing indicator (wave lines) */
.typing-waves {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-waves span {
    width: 4px;
    height: 16px;
    background: #90949c;
    border-radius: 2px;
    animation: typingWave 0.6s ease-in-out infinite both;
}

.typing-waves span:nth-child(1) { animation-delay: 0s; }
.typing-waves span:nth-child(2) { animation-delay: 0.15s; }
.typing-waves span:nth-child(3) { animation-delay: 0.3s; }
.typing-waves span:nth-child(4) { animation-delay: 0.45s; }

@keyframes typingWave {
    0%, 60%, 100% { transform: scaleY(0.5); opacity: 0.6; }
    30% { transform: scaleY(1); opacity: 1; }
}

.chat-input-container {
    padding: 8px 12px 10px;
    background: #f0f2f5;
    border-top: 1px solid #e0e0e0;
}

.chat-footer {
    padding: 10px 12px 14px;
    background: #f0f2f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 13px;
    color: #667781;
}

.chat-footer a {
    color: #0084ff;
    text-decoration: none;
    font-weight: 500;
}

.chat-footer a:hover {
    text-decoration: underline;
}

.chat-footer .download-cv-link,
.chat-footer .download-cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chat-footer .download-cv-button {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: #0084ff;
    font-weight: 500;
}

.chat-footer .download-cv-button:hover {
    text-decoration: underline;
}

.chat-footer .download-cv-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-footer .download-cv-link svg {
    flex-shrink: 0;
}

.chat-footer .footer-separator {
    margin: 0 0.5rem;
    color: var(--text-light);
}

.chat-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.question-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: all 0.2s;
}

.question-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.question-input:disabled {
    background: var(--bg);
    color: var(--text-light);
    cursor: not-allowed;
}

.send-button {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.send-button:active:not(:disabled) {
    transform: translateY(0);
}

.send-button:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.error-message {
    background: #fef2f2;
    color: var(--error);
    padding: 12px 16px;
    border-radius: 10px;
    margin: 10px 0;
    border: 1px solid #fecaca;
    font-size: 13px;
}

/* Registration form styles */
.registration-step {
    padding: 40px 20px;
}

.input-container {
    max-width: 500px;
    margin: 30px auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.registration-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: all 0.2s;
}

.registration-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.registration-button {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.registration-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.registration-button:active {
    transform: translateY(0);
}

.google-signin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.google-signin-button:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.upload-section-main {
    max-width: 500px;
    margin: 30px auto 0;
    text-align: center;
}

.upload-button-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-button-main:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.upload-button-main:active {
    transform: translateY(0);
}

.link-container {
    max-width: 600px;
    margin: 30px auto 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.link-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    font-family: monospace;
    outline: none;
}

.copy-button {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-button:hover {
    background: var(--primary-dark);
}

.set-password-section {
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.set-password-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.set-password-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.set-password-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
    margin: 0 auto 8px;
}

.set-password-form .registration-input {
    width: 100%;
}

.set-password-success {
    font-size: 14px;
    color: var(--success);
}

.set-password-success a {
    color: var(--primary);
    font-weight: 600;
}

.reupload-section {
    margin: 24px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.reupload-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.reupload-button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.reupload-button-secondary {
    margin-left: 10px;
    background: transparent;
    border-color: var(--border);
    color: var(--text-light);
}

.reupload-button-secondary:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--text-light);
}

.reupload-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
}

/* Analytics Dashboard */
.analytics-dashboard {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.dashboard-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-light);
}

.interactions-section,
.downloads-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.interactions-list,
.downloads-list {
    max-height: 360px;
    overflow-y: auto;
}

.interaction-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.interaction-question {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.interaction-answer {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.interaction-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 8px;
}

.interaction-item-meta-only {
    padding: 8px 12px;
}

.interaction-item-meta-only .interaction-meta {
    margin-top: 0;
}

.download-item {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.empty-state {
    font-size: 13px;
    color: var(--text-light);
    padding: 16px 0;
}

/* Pro paywall */
.paywall-box {
    padding: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.paywall-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.paywall-text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.paywall-cta {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.paywall-cta:hover {
    background: var(--primary-dark);
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--primary-dark);
}

.link-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Upgrade page pricing */
.pro-features-list {
    text-align: left;
    max-width: 360px;
    margin: 16px auto 24px;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.pro-features-list li {
    margin-bottom: 8px;
}

.pricing-options {
    margin-top: 24px;
}

.pricing-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.pricing-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pricing-option {
    flex: 1;
    min-width: 140px;
    padding: 14px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s, background 0.2s;
}

.pricing-option:hover {
    border-color: var(--primary);
}

.pricing-option.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
}

.pricing-amount {
    display: block;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.pricing-period {
    font-size: 12px;
    color: var(--text-light);
}

.checkout-cta {
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.checkout-cta:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.share-label {
    font-size: 13px;
    color: var(--text-light);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-light);
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.link-note {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.user-info {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.user-description {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: none;
        padding: 12px 16px 10px;
    }

    .sidebar-header {
        padding-bottom: 0;
    }

    .main-content {
        margin-top: 0;
    }

    .chat-messages {
        padding-top: 8px;
    }

    .message-content {
        max-width: 85%;
    }

    .link-container {
        flex-direction: column;
    }

    .link-input {
        width: 100%;
    }

    .copy-button {
        width: 100%;
    }
}

/* App popup modal (replaces alert) */
.app-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.app-popup-overlay.app-popup-visible {
    opacity: 1;
    visibility: visible;
}
.app-popup-box {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.app-popup-message {
    font-size: 15px;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
}
.app-popup-close {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.app-popup-close:hover {
    background: var(--primary-dark);
}
