/* ===========================================
   spLinkPage.css - Public Profile / Link Page
   Base styles: page layout, profile container,
   buttons, and shared modal base classes.
   Component-specific styles are in spLinkPartials/
   =========================================== */

:root {
    --link-primary: #1a1a2e;
    --link-primary-light: #16213e;
    --link-accent: #0f3460;
    --link-btn-bg: #ffffff;
    --link-btn-text: #1a1a2e;
    --link-btn-border: #e2e8f0;
    --link-btn-hover: #f8fafc;
    --link-btn-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --link-btn-hover-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    --link-text-primary: #1f2937;
    --link-text-secondary: #6b7280;
    --link-text-muted: #9ca3af;
    --link-bg: #f9fafb;
    --link-radius: 12px;
    --link-transition: all 0.2s ease;
}

/* Page wrapper */
.link-page-wrapper {
    min-height: 100vh;
    background: var(--link-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.link-page-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Profile container */
.link-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Component Buttons */
.link-profile-components {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 20px 0;
    margin-top: 8px;
}

.link-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    background: var(--link-btn-bg);
    border: 1px solid var(--link-btn-border);
    border-radius: var(--link-radius);
    font-size: 15px;
    font-weight: 500;
    color: var(--link-btn-text);
    cursor: pointer;
    transition: var(--link-transition);
    box-shadow: var(--link-btn-shadow);
    font-family: inherit;
}

.link-profile-btn:hover {
    background: var(--link-btn-hover);
    box-shadow: var(--link-btn-hover-shadow);
    transform: translateY(-1px);
}

.link-profile-btn:active {
    transform: translateY(0);
    box-shadow: var(--link-btn-shadow);
}

/* ===========================================
   Shared Modal Base Styles
   Mobile: Full-screen takeover
   Desktop: Centered modal with backdrop blur
   =========================================== */

.link-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.link-modal-overlay.open {
    opacity: 1;
}

.link-modal {
    background: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.2s ease;
}

.link-modal-overlay.open .link-modal {
    transform: translateY(0);
}

.link-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.link-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--link-text-primary);
    margin: 0;
}

.link-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    color: #6b7280;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.link-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.link-modal-body {
    padding: 24px 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.link-modal-empty {
    text-align: center;
    color: var(--link-text-muted);
    font-size: 14px;
    padding: 40px 0;
}

/* ===========================================
   Desktop Styles (768px+)
   =========================================== */

@media screen and (min-width: 768px) {
    .link-page-container {
        padding: 40px 24px 0;
    }

    .link-profile-components {
        padding: 24px 0;
    }

    .link-profile-btn {
        padding: 18px 28px;
        font-size: 16px;
        border-radius: 14px;
    }

    /* Desktop modal: centered with blur */
    .link-modal-overlay {
        align-items: center;
        padding: 24px;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .link-modal {
        width: 100%;
        max-width: 560px;
        height: auto;
        max-height: 85vh;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    }

    .link-modal-header {
        padding: 20px 24px;
    }

    .link-modal-body {
        padding: 28px 24px;
    }
}

/* ===========================================
   Large Desktop (1024px+)
   =========================================== */

@media screen and (min-width: 1024px) {
    .link-page-container {
        padding: 48px 24px 0;
    }
}
