/* ============================================================================
   Mailing > Soubory — Public landing page
   Self-contained, no theme dependencies. Branded via tenant CSS variables.
   ============================================================================ */

:root {
    --fl-primary: #e11d48;
    --fl-primary-dark: #be123c;
    --fl-bg: #f8fafc;
    --fl-surface: #ffffff;
    --fl-border: #e5e7eb;
    --fl-text: #1f2937;
    --fl-muted: #64748b;
    --fl-radius: 16px;
}

.file-landing {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--fl-bg);
    color: var(--fl-text);
    min-height: 100vh;
    line-height: 1.5;
}

.fl-header {
    background: var(--fl-surface);
    border-bottom: 1px solid var(--fl-border);
    padding: 14px 20px;
}

.fl-header-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.fl-logo {
    max-height: 40px;
    width: auto;
}

.fl-logo-text {
    font-weight: 700;
    font-size: 16px;
    color: var(--fl-text);
}

.fl-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px;
}

.fl-card {
    background: var(--fl-surface);
    border-radius: var(--fl-radius);
    padding: 36px 28px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    border: 1px solid var(--fl-border);
    text-align: center;
}

.fl-card-error {
    background: #fef2f2;
    border-color: #fecaca;
}

.fl-icon {
    font-size: 56px;
    margin-bottom: 12px;
    line-height: 1;
}

.fl-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: var(--fl-text);
}

.fl-desc {
    margin: 0 0 16px;
    color: var(--fl-muted);
    font-size: 15px;
    line-height: 1.5;
}

.fl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--fl-muted);
}

.fl-meta-item {
    background: var(--fl-bg);
    padding: 6px 12px;
    border-radius: 999px;
}

.fl-meta-item.fl-expires {
    background: #fef3c7;
    color: #92400e;
}

/* PIN section */
.fl-pin-section {
    margin: 24px auto;
    max-width: 320px;
    text-align: center;
}

.fl-pin-label {
    font-size: 14px;
    color: var(--fl-muted);
    margin-bottom: 12px;
}

.fl-pin-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--fl-border);
    border-radius: 12px;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 6px;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    transition: border 0.15s;
}

.fl-pin-input:focus {
    border-color: var(--fl-primary);
}

/* Buttons */
.fl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.1s, opacity 0.15s, background 0.15s;
}

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

.fl-btn-primary {
    background: var(--fl-primary);
    color: #fff;
    width: 100%;
}

.fl-btn-primary:hover {
    background: var(--fl-primary-dark);
}

.fl-btn-secondary {
    background: var(--fl-bg);
    color: var(--fl-text);
    border: 1px solid var(--fl-border);
}

.fl-btn-secondary:hover {
    background: #f1f5f9;
}

.fl-btn-ghost {
    background: transparent;
    color: var(--fl-muted);
    padding: 8px 12px;
    font-size: 13px;
}

.fl-btn-ghost:hover {
    background: var(--fl-bg);
}

.fl-btn-large {
    padding: 16px 28px;
    font-size: 16px;
}

/* Error message */
.fl-error {
    color: #b91c1c;
    background: #fee2e2;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 8px;
}

/* Content */
.fl-content {
    margin-top: 16px;
}

.fl-actions {
    margin: 16px auto 0;
    max-width: 360px;
}

/* Bundle items */
.fl-bundle-divider {
    text-align: center;
    color: var(--fl-muted);
    font-size: 13px;
    margin: 20px 0 12px;
    position: relative;
}

.fl-bundle-divider::before,
.fl-bundle-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--fl-border);
}

.fl-bundle-divider::before { left: 0; }
.fl-bundle-divider::after  { right: 0; }

.fl-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    text-align: left;
}

.fl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--fl-bg);
    border-radius: 12px;
    border: 1px solid var(--fl-border);
}

.fl-item-icon {
    font-size: 22px;
    line-height: 1;
}

.fl-item-info {
    flex: 1;
    min-width: 0;
}

.fl-item-name {
    font-weight: 600;
    color: var(--fl-text);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fl-item-size {
    font-size: 12px;
    color: var(--fl-muted);
}

/* Preview wrap (single file) */
.fl-preview-wrap {
    margin: 0 auto 16px;
    max-height: 60vh;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid var(--fl-border);
}

.fl-preview-img {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    margin: 0 auto;
}

.fl-preview-pdf {
    display: block;
    width: 100%;
    height: 60vh;
    border: none;
}

/* Lightbox */
.fl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fl-lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.fl-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fl-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
}

.fl-lightbox-content embed {
    width: 90vw;
    height: 90vh;
    border-radius: 8px;
    background: #fff;
}

.fl-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.fl-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer */
.fl-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--fl-muted);
    font-size: 12px;
}

/* Mobile */
@media (max-width: 640px) {
    .fl-main {
        padding: 16px 12px;
    }
    .fl-card {
        padding: 24px 16px;
    }
    .fl-title {
        font-size: 22px;
    }
    .fl-icon {
        font-size: 48px;
    }
    .fl-item {
        flex-wrap: wrap;
    }
    .fl-item-info {
        width: 100%;
        margin-bottom: 4px;
    }
}
