/**
 * Swift Auth - Frontend Styles
 */

/* ==========================================================================
   Content Blur (for hard walls)
   ========================================================================== */

.swift-content-blurred {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    position: relative;
}

.swift-content-blurred::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.9) 100%);
}

/* ==========================================================================
   Content Lock (for hard walls - removes content from DOM)
   ========================================================================== */

.swift-content-hidden {
    display: none;
}

.swift-content-locked {
    min-height: 200px;
}

/* ==========================================================================
   Wall Containers
   ========================================================================== */

/* Base styles moved to "All walls - pinned to top" section below */

/* Overlay for modals - separate element approach */
.swift-wall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

/* All walls - pinned to top of viewport */
#swift-regwall-container,
#swift-paywall-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    bottom: auto;
    right: auto;
    width: 90%;
    max-width: 520px;
    border-radius: 4px;
    background-color: #ffffff !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 48px 40px;
    z-index: 9999;
}

#swift-regwall-container[style*="display: block"],
#swift-paywall-container[style*="display: block"] {
    transform: translateX(-50%);
}

/* Remove the problematic ::before pseudo-element */
#swift-regwall-container::before,
#swift-paywall-container::before {
    display: none;
}

/* ==========================================================================
   Wall Modal Styles
   ========================================================================== */

.swift-paywall-modal,
.swift-regwall-modal {
    text-align: center;
    background: #ffffff;
}

.swift-paywall-modal h2,
.swift-regwall-modal h2 {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.swift-paywall-modal p,
.swift-regwall-modal p {
    margin: 0 0 24px 0;
    font-size: 17px;
    line-height: 1.6;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.swift-btn-primary {
    display: inline-block;
    padding: 14px 40px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.swift-btn-primary:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.swift-btn-secondary {
    display: inline-block;
    padding: 14px 40px;
    background: transparent;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #1a1a1a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.swift-btn-secondary:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ==========================================================================
   Inline Paywall Display
   ========================================================================== */

.swift-paywall-inline {
    min-height: 300px;
}

.swift-paywall-inline .swift-paywall-message,
.swift-paywall-inline .swift-login-required-message {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 48px 32px;
    text-align: center;
    max-width: 500px;
    margin: 40px auto;
}

.swift-paywall-inline .swift-paywall-message h2,
.swift-paywall-inline .swift-login-required-message h2 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.swift-paywall-inline .swift-paywall-message p,
.swift-paywall-inline .swift-login-required-message p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

/* ==========================================================================
   Inline Regwall Display
   ========================================================================== */

.swift-regwall-inline {
    position: relative;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
}

.swift-regwall-inline .swift-regwall-message {
    max-width: 450px;
    margin: 0 auto;
}

.swift-regwall-inline .swift-regwall-message h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.swift-regwall-inline .swift-regwall-message p {
    margin: 0 0 20px 0;
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

.swift-regwall-inline [data-swift-close] {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    line-height: 28px;
    text-align: center;
    transition: all 0.2s ease;
}

.swift-regwall-inline [data-swift-close]:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* Hard wall inline - blur content below (exclude wall divs from blur) */
.swift-content-blurred-below > *:not(.swift-regwall-inline):not(.swift-paywall-inline-soft):not(.swift-paywall-inline-hard) {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

/* Hide content after inline wall (content below first .module-ad) */
.swift-wall-hidden {
    display: none !important;
}

/* ==========================================================================
   Meter Notice
   ========================================================================== */

.swift-meter-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #92400e;
}

.swift-meter-notice p {
    margin: 0 0 4px 0;
}

.swift-meter-notice a {
    color: #92400e;
    font-weight: 600;
}

/* ==========================================================================
   Magic Link Notice
   ========================================================================== */

#swift-magic-notice {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #1e40af;
}

#swift-magic-notice p {
    margin: 0;
}

#swift-magic-notice a {
    color: #1e40af;
    font-weight: 600;
}

/* ==========================================================================
   Entitlement Banner
   ========================================================================== */

#swift-entitlement-banner {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #991b1b;
}

#swift-entitlement-banner p {
    margin: 0;
}

#swift-entitlement-banner a {
    color: #991b1b;
    font-weight: 600;
}

/* ==========================================================================
   Bookmark Button
   ========================================================================== */

/* Bookmark button - plugin toggles classes, default styling provided below
   Classes added by plugin:
   - .swift-bookmark-active: when article is bookmarked
   - .swift-bookmark-disabled: when user is not logged in

   Theme can override these styles as needed.
*/

/* Default bookmark button styling */
[data-swift-bookmark] {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

[data-swift-bookmark]:hover {
    opacity: 0.8;
}

[data-swift-bookmark].swift-bookmark-disabled {
    opacity: 0.5;
    cursor: default;
}

/* SVG icon styling - outlined when not bookmarked */
[data-swift-bookmark] svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

/* SVG icon styling - filled when bookmarked */
[data-swift-bookmark].swift-bookmark-active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Alternative: if using Font Awesome or similar icon fonts */
[data-swift-bookmark] .fa-bookmark,
[data-swift-bookmark] .icon-bookmark {
    font-weight: 400; /* Regular/outlined */
}

[data-swift-bookmark].swift-bookmark-active .fa-bookmark,
[data-swift-bookmark].swift-bookmark-active .icon-bookmark {
    font-weight: 900; /* Solid/filled */
}

/* ==========================================================================
   Login Required Modal
   ========================================================================== */

.swift-login-required {
    padding: 0;
}

.swift-login-required h2 {
    margin-bottom: 16px;
}

/* ==========================================================================
   Close Button (for soft walls)
   ========================================================================== */

[data-swift-close] {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    line-height: 36px;
    text-align: center;
    transition: all 0.2s ease;
}

[data-swift-close]:hover {
    background: #e5e5e5;
    color: #1a1a1a;
}

/* ==========================================================================
   Password Visibility Toggle
   ========================================================================== */

.swift-password-wrapper {
    position: relative;
}

.swift-password-wrapper input {
    padding-right: 44px;
}

.swift-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.swift-password-toggle:hover {
    opacity: 1;
}

/* ==========================================================================
   Postal Code Location Detect Button
   ========================================================================== */

.swift-postal-wrapper {
    position: relative;
}

.swift-postal-wrapper input {
    padding-right: 44px;
}

.swift-postal-locate {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    opacity: 0.7;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.swift-postal-locate:hover {
    opacity: 1;
    color: #0d6efd;
}

.swift-postal-locate:disabled {
    cursor: wait;
    opacity: 0.5;
}

.swift-postal-locating svg {
    animation: swift-spinner 0.8s linear infinite;
}

/* ==========================================================================
   Auth Level Visibility Helpers
   ========================================================================== */

/* Show only for anonymous users */
[data-auth-root][data-auth-level="full"] .swift-show-anonymous,
[data-auth-root][data-auth-level="magic"] .swift-show-anonymous {
    display: none !important;
}

/* Show only for authenticated users */
[data-auth-root][data-auth-level="anonymous"] .swift-show-authenticated {
    display: none !important;
}

/* Show only for fully authenticated users */
[data-auth-root][data-auth-level="anonymous"] .swift-show-full,
[data-auth-root][data-auth-level="magic"] .swift-show-full {
    display: none !important;
}

/* Show only for magic session users */
[data-auth-root][data-auth-level="anonymous"] .swift-show-magic,
[data-auth-root][data-auth-level="full"] .swift-show-magic {
    display: none !important;
}

/* ==========================================================================
   Why Register Modal
   ========================================================================== */

.swift-why-register-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.swift-why-register-modal {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: swift-modal-appear 0.2s ease-out;
}

@keyframes swift-modal-appear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swift-why-register-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 28px;
    text-align: center;
    color: #666;
    transition: all 0.2s ease;
    z-index: 1;
}

.swift-why-register-close:hover {
    background: #e5e5e5;
    color: #1a1a1a;
}

.swift-why-register-content {
    padding: 32px;
}

.swift-why-register-content h2,
.swift-why-register-content h3 {
    margin: 0 0 16px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.swift-why-register-content p {
    margin: 0 0 16px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.swift-why-register-content ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.swift-why-register-content li {
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #555;
}

/* Prevent body scroll when modal is open */
body.swift-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 640px) {
    #swift-regwall-container,
    #swift-paywall-container {
        width: 94%;
        top: 20px;
        padding: 32px 24px;
    }

    .swift-paywall-modal h2,
    .swift-regwall-modal h2 {
        font-size: 22px;
    }

    .swift-paywall-modal p,
    .swift-regwall-modal p {
        font-size: 15px;
    }

    .swift-btn-primary,
    .swift-btn-secondary {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 24px;
    }
}

/* ==========================================================================
   Social Sign-In Buttons
   ========================================================================== */

.swift-social-signin {
    margin-top: 24px;
    display: none;
}

.swift-social-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.swift-social-divider::before,
.swift-social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.swift-social-divider span {
    padding: 0 16px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swift-btn-google,
.swift-btn-facebook {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.swift-btn-google {
    background: #ffffff;
    color: #444;
}

.swift-btn-google:hover {
    background: #f8f8f8;
    border-color: #ccc;
}

.swift-btn-google:active {
    background: #f0f0f0;
}

.swift-btn-facebook {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

.swift-btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
}

.swift-btn-facebook:active {
    background: #145dbf;
}

.swift-btn-google svg,
.swift-btn-facebook svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Google icon colors */
.swift-btn-google svg .google-blue {
    fill: #4285f4;
}
.swift-btn-google svg .google-green {
    fill: #34a853;
}
.swift-btn-google svg .google-yellow {
    fill: #fbbc05;
}
.swift-btn-google svg .google-red {
    fill: #ea4335;
}

/* Disabled state */
.swift-btn-google:disabled,
.swift-btn-facebook:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading state */
.swift-btn-google.loading,
.swift-btn-facebook.loading {
    position: relative;
    pointer-events: none;
}

.swift-btn-google.loading::after,
.swift-btn-facebook.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: swift-spinner 0.8s linear infinite;
}

@keyframes swift-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Social auth error message */
.swift-social-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    #swift-regwall-container,
    #swift-paywall-container,
    #swift-magic-notice,
    #swift-entitlement-banner,
    .swift-meter-notice,
    .swift-why-register-overlay {
        display: none !important;
    }

    .swift-content-blurred,
    .swift-content-locked {
        filter: none;
        pointer-events: auto;
        user-select: auto;
    }

    .swift-content-blurred::after {
        display: none;
    }
}

/* ==========================================================================
   Onboarding Form
   ========================================================================== */

.swift-onboarding-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.swift-onboarding-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
}

.swift-onboarding-header {
    text-align: center;
    margin-bottom: 2rem;
}

.swift-onboarding-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.swift-onboarding-subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin: 0;
}

.swift-onboarding-form .form-group {
    margin-bottom: 1.5rem;
}

.swift-onboarding-form .form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.swift-onboarding-form .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.swift-onboarding-form .form-control:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.swift-onboarding-form .form-control:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.swift-onboarding-form .form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.swift-onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.swift-onboarding-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.15s ease;
}

.swift-onboarding-actions .btn-primary {
    width: 100%;
}

.swift-onboarding-actions .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35);
}

.swift-onboarding-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.swift-onboarding-actions .btn-link {
    color: #6b7280;
    text-decoration: none;
    padding: 0.5rem;
}

.swift-onboarding-actions .btn-link:hover:not(:disabled) {
    color: #374151;
    text-decoration: underline;
}

.swift-onboarding-form .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.swift-onboarding-form .me-2 {
    margin-right: 0.5rem;
}

@media (max-width: 576px) {
    .swift-onboarding-card {
        padding: 1.5rem;
    }

    .swift-onboarding-header h2 {
        font-size: 1.5rem;
    }
}

/* Onboarding loading shimmer */
.swift-onboarding-loading {
    padding: 2rem 0;
}

.swift-onboarding-shimmer {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.swift-onboarding-shimmer:nth-child(1) {
    width: 60%;
}

.swift-onboarding-shimmer:nth-child(2) {
    width: 80%;
}

.swift-onboarding-shimmer:nth-child(3) {
    width: 70%;
}

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

/* Outline button styles */
.swift-btn-outline {
    background: transparent;
    border: 2px solid #6b7280;
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-block;
}

.swift-btn-outline:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #374151;
    color: #374151;
    text-decoration: none;
}

.swift-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Multi-Step Onboarding
   ========================================================================== */

/* Progress indicator */
.swift-onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.swift-onboarding-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.2s ease;
    /* Hide the number text */
    font-size: 0;
    text-indent: -9999px;
}

.swift-onboarding-step.active {
    background: #0d6efd;
    color: white;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.swift-onboarding-step.completed {
    background: #10b981;
    color: white;
}

.swift-onboarding-step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    max-width: 80px;
}

/* Step content animations */
.swift-onboarding-step-content {
    animation: swift-fade-in 0.3s ease-out;
}

@keyframes swift-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back button */
.swift-onboarding-back {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.swift-onboarding-back .btn-link {
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.swift-onboarding-back .btn-link:hover:not(:disabled) {
    color: #374151;
    text-decoration: underline;
    background: transparent !important;
}

.swift-onboarding-back .btn-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Geolocation button styling */
.btn-block {
    width: 100%;
    display: block;
}

.bi {
    display: inline-block;
    vertical-align: middle;
}

/* Text colors */
.text-success {
    color: #10b981 !important;
}

.text-muted {
    color: #6b7280 !important;
}

.text-center {
    text-align: center;
}

/* Margin utilities */
.mt-2 {
    margin-top: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.me-1 {
    margin-right: 0.25rem;
}

/* Alert styling for geolocation errors */
.alert-info {
    background-color: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #0369a1;
    font-size: 0.875rem;
}

.alert-info .btn-link {
    color: #0369a1;
    font-weight: 600;
    text-decoration: underline;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: inherit;
}

.alert-info .btn-link:hover {
    color: #075985;
}

/* ==========================================================================
   Auth Indicator Loading State
   ========================================================================== */

/* Auth indicator loading state */
.swift-auth-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 36px;
    color: var(--swift-auth-loading-color, #666);
}

.swift-auth-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: swift-auth-spin 0.6s linear infinite;
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .swift-auth-loading::after {
        animation: none;
        opacity: 0.5;
    }
}

/* ==========================================================================
   Subscribe Page — Plan Cards
   ========================================================================== */

.swift-subscribe-header {
    text-align: center;
    margin-bottom: 32px;
}

.swift-subscribe-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.swift-subscribe-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* --- Mobile (default): compact row cards --- */

.swift-plan-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.swift-plan-card {
    display: grid;
    grid-template-columns: 1fr auto auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0 16px;
    padding: 16px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.swift-plan-badge {
    display: none;
}

.swift-plan-label {
    grid-column: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.swift-plan-price {
    grid-column: 2;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.swift-plan-currency {
    font-size: 60%;
    vertical-align: super;
    font-weight: 600;
}

.swift-plan-period {
    grid-column: 1;
    grid-row: 2;
    font-size: 13px;
    color: #888;
    margin: 0;
}

.swift-plan-cta {
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: center;
    padding: 10px 20px;
    font-size: 13px;
    white-space: nowrap;
}

/* Featured card — mobile accent */
.swift-plan-featured {
    border-left: 3px solid #1a1a1a;
    background: #fafafa;
}

/* --- Desktop (768px+): vertical cards side by side --- */

@media (min-width: 768px) {
    .swift-subscribe-title {
        font-size: 34px;
    }

    .swift-plan-grid {
        flex-direction: row;
        gap: 0;
        max-width: 840px;
    }

    .swift-plan-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 1;
        padding: 32px 24px;
        border-radius: 0;
        border-right: none;
    }

    .swift-plan-card:first-child {
        border-radius: 4px 0 0 4px;
    }

    .swift-plan-card:last-child {
        border-right: 1px solid #ddd;
        border-radius: 0 4px 4px 0;
    }

    .swift-plan-badge {
        display: block;
        min-height: 24px;
        margin-bottom: 8px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #1a1a1a;
    }

    .swift-plan-label {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .swift-plan-price {
        font-size: 40px;
        margin-bottom: 4px;
    }

    .swift-plan-period {
        margin-bottom: 24px;
        font-size: 14px;
    }

    .swift-plan-cta {
        padding: 14px 32px;
        font-size: 14px;
        width: 100%;
    }

    /* Featured card — desktop elevation */
    .swift-plan-featured {
        border-left: 1px solid #ddd;
        border-top: 2px solid #1a1a1a;
        background: #fff;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        margin-top: -8px;
        margin-bottom: -8px;
        padding-top: 40px;
        padding-bottom: 40px;
        z-index: 1;
        position: relative;
    }
}

/* ==========================================================================
   Purchased Photos (Profile)
   ========================================================================== */

.swift-photo-purchases-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swift-photo-purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 16px;
}

.swift-photo-purchase-item:last-child {
    border-bottom: none;
}

.swift-photo-purchase-info {
    flex: 1;
    min-width: 0;
}

.swift-photo-purchase-caption {
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swift-photo-purchase-article {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.swift-photo-purchase-article a {
    color: #2563eb;
    text-decoration: none;
}

.swift-photo-purchase-article a:hover {
    text-decoration: underline;
}

.swift-photo-purchase-meta {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.swift-photo-purchase-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
}

.swift-photo-purchase-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
