/**
 * Photo Huber - Autarkes Webalben- & Eventgalerien-Portal Stylesheet
 * Standalone Modul /webalben/
 */

/* -------------------------------------------------------------------------
   1. Typography & Font Faces (Inter)
   ------------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/InterVariable.woff2') format('woff2-variations'),
         url('fonts/InterVariable.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Bold.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* -------------------------------------------------------------------------
   2. Design System Variables
   ------------------------------------------------------------------------- */
:root {
    --primary: #D10031;
    --primary-hover: #b5002a;
    --primary-light: rgba(209, 0, 49, 0.08);
    --secondary: #2563eb;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.12);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button, input, select, textarea {
    font-family: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

/* -------------------------------------------------------------------------
   3. Buttons & Badges
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(209, 0, 49, 0.25);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-success {
    background: #16a34a;
    color: #ffffff;
}
.btn-success:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    background: #ffffff;
    border-color: #94a3b8;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 20px;
}

/* -------------------------------------------------------------------------
   4. Header Navigation
   ------------------------------------------------------------------------- */
.album-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
    transition: var(--transition);
}

.album-header-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand-area {
    display: flex;
    align-items: center;
}

.brand-header-logo {
    height: 38px;
    width: auto;
    max-height: 42px;
    object-fit: contain;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   5. Portal View: Hero & Code Search
   ------------------------------------------------------------------------- */
.portal-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 28px 24px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portal-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(209, 0, 49, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.portal-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 13px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
}

.portal-hero-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.portal-hero-desc {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 0;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* Code Search Box */
.portal-search-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    max-width: 580px;
    margin: 0 auto;
    text-align: left;
}

.portal-search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid transparent;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-search {
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.portal-search-tips {
    padding: 6px 10px 2px;
    font-size: 11.5px;
    color: #64748b;
}

.portal-search-error {
    margin: 10px 12px 2px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
}

/* -------------------------------------------------------------------------
   6. Portal Sections & Grids
   ------------------------------------------------------------------------- */
.portal-section {
    padding: 48px 24px;
}

.portal-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Customer Folders Grid */
.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.folder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.folder-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.folder-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.folder-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #475569;
}

.folder-lock-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-locked {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.badge-unlocked {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
}

.folder-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.folder-card-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.folder-card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 700;
    margin-top: 16px;
}

/* =========================================================================
   5b. Folder Full-Page Screen (Hauptalben-Detailansicht)
   ========================================================================= */
.folder-view-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    position: sticky;
    top: 60px;
    z-index: 40;
    backdrop-filter: blur(8px);
}

.folder-view-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.folder-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.folder-breadcrumbs .crumb-link {
    cursor: pointer;
    transition: color 0.15s ease;
}

.folder-breadcrumbs .crumb-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.folder-breadcrumbs .crumb-sep {
    color: #94a3b8;
}

.folder-breadcrumbs .crumb-active {
    color: var(--text-main);
    font-weight: 700;
}

.folder-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 45px 24px 50px;
    position: relative;
    overflow: hidden;
}

.folder-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(209, 0, 49, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.folder-hero-inner {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.folder-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 12px;
}

.folder-hero-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.folder-hero-desc {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 0;
}

.folder-search-box {
    margin-top: 20px;
    max-width: 520px;
}

.folder-search-box .search-input-wrapper {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.folder-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
    line-height: 1;
    z-index: 2;
}

.folder-search-box .search-input {
    width: 100%;
    color: #0f172a;
    font-size: 14px;
    padding: 11px 36px 11px 42px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    box-sizing: border-box;
}

.folder-search-box .search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(209, 0, 49, 0.15);
}

.folder-search-box .search-input::placeholder {
    color: #94a3b8;
}

.folder-search-box .btn-clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.btn-clear-search {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-clear-search:hover {
    color: var(--primary);
}

/* =========================================================================
   5c. Webalben Tabellenansicht (Listenform) & View-Toggles
   ========================================================================= */
.view-mode-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.btn-view-toggle {
    background: transparent;
    border: none;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-view-toggle:hover {
    color: var(--text-main);
}

.btn-view-toggle.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(209, 0, 49, 0.25);
}

.folder-galleries-list-wrap {
    width: 100%;
}

.webalben-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.webalben-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

.webalben-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.webalben-table tbody tr.webalben-table-row {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
    cursor: pointer;
}

.webalben-table tbody tr.webalben-table-row:last-child {
    border-bottom: none;
}

.webalben-table tbody tr.webalben-table-row:hover {
    background: #f8fafc;
}

.webalben-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.webalben-table-thumb {
    width: 64px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.webalben-table-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webalben-table-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.3;
}

.webalben-table-branch {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.webalben-table-date {
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 500;
}

.mobile-only-inline {
    display: none;
}

.mobile-only-flex {
    display: none;
}

/* Public Albums Grid */
.public-albums-grid,
.folder-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.album-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.album-card-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.album-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.album-card:hover .album-card-cover img {
    transform: scale(1.05);
}

.album-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #ffffff;
}

.album-card-pin-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    backdrop-filter: blur(6px);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.album-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.album-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 8px;
}

.album-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   7. Album View: Hero, Toolbar, Photo Grid
   ------------------------------------------------------------------------- */
.album-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 42px 0 46px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.album-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(209, 0, 49, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.album-hero-inner {
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.album-folder-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
    backdrop-filter: blur(8px);
}

.album-title-main {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 12px;
}

.album-meta-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.album-meta-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.album-welcome-text {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14.5px;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Album Toolbar (Sticky) */
.album-toolbar {
    position: sticky;
    top: 60px;
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    width: 100%;
}

.album-toolbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.view-filter-tabs {
    display: flex;
    gap: 8px;
}

.filter-tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-tab.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(209, 0, 49, 0.2);
}

.action-buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Gallery Grid */
.gallery-container {
    max-width: 1320px;
    margin: 24px auto 60px;
    padding: 0 24px;
    width: 100%;
    box-sizing: border-box;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.photo-card {
    background: #0f172a;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.photo-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.photo-card-thumb-wrap {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.photo-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-card-img {
    transform: scale(1.04);
}

.photo-card .photo-card-info,
.photo-card .photo-card-open-btn {
    display: none;
}

/* Gallery List View */
.gallery-grid.is-list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-grid.is-list-view .photo-card {
    aspect-ratio: auto;
    height: auto;
    min-height: 60px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 16px;
    gap: 16px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.gallery-grid.is-list-view .photo-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.gallery-grid.is-list-view .photo-card-thumb-wrap {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #0f172a;
    position: relative;
    inset: auto;
}

.gallery-grid.is-list-view .photo-card-thumb-wrap .photo-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
}

.gallery-grid.is-list-view .photo-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.gallery-grid.is-list-view .photo-card-filename {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
}

.gallery-grid.is-list-view .photo-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gallery-grid.is-list-view .photo-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: static;
}

.gallery-grid.is-list-view .photo-fav-toggle {
    position: static;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid var(--border-color);
}

.gallery-grid.is-list-view .photo-fav-toggle:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

.gallery-grid.is-list-view .photo-fav-toggle.is-fav {
    background: #fee2e2;
    color: var(--primary);
    border-color: rgba(209, 0, 49, 0.3);
}

.gallery-grid.is-list-view .photo-card-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
}

.gallery-grid.is-list-view .photo-card-open-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Favorite Heart on Photo Card */
.photo-fav-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: none;
    color: #ffffff;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.photo-fav-toggle:hover {
    transform: scale(1.15);
    background: rgba(0, 0, 0, 0.7);
}

.photo-fav-toggle.is-fav {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Filename Badge on Photo Card */
.photo-filename-badge {
    display: none !important;
}

/* Infinite Scroll Loader & Indicators */
.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 36px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(209, 0, 49, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.all-loaded-indicator {
    text-align: center;
    padding: 30px 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* -------------------------------------------------------------------------
   8. Fullscreen Lightbox
   ------------------------------------------------------------------------- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 2000;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(8px);
}

.lightbox-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.lightbox-info-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.lightbox-counter {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.lightbox-filename {
    font-size: 12.5px;
    font-weight: 600;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 9px;
    border-radius: 6px;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
    max-width: 340px;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-btn-close {
    font-size: 22px;
    padding: 6px 14px;
    line-height: 1;
}

.lightbox-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    user-select: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(209, 0, 49, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* -------------------------------------------------------------------------
   9. Modals & Dialogs
   ------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-box-wide {
    max-width: 940px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 26px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
}

.modal-close-btn:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.modal-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 3px 10px;
    border-radius: 20px;
}

/* PIN Screen & PIN Card */
.pin-screen-container {
    max-width: 460px;
    margin: 80px auto;
    padding: 0 20px;
}

.pin-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.pin-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.pin-input {
    width: 100%;
    padding: 14px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 0.3em;
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #f8fafc;
    margin-bottom: 16px;
    transition: var(--transition);
}

.pin-input:focus {
    outline: none;
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Form Styling */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: #ffffff;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.radio-card-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.radio-card {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: var(--transition);
}

.radio-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.radio-card input:checked ~ div strong {
    color: var(--primary);
}

.order-items-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    background: #f8fafc;
}

.order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 6px;
    gap: 12px;
}

.order-item-thumb {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}

.order-item-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-step-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: #f8fafc;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.order-step-btn:hover {
    background: #e2e8f0;
}

.order-step-val {
    font-weight: 700;
    font-size: 13.5px;
    min-width: 24px;
    text-align: center;
}

/* -------------------------------------------------------------------------
   10. Toast Notifications
   ------------------------------------------------------------------------- */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.25s ease forwards;
}

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

/* -------------------------------------------------------------------------
   11. Global Footer
   ------------------------------------------------------------------------- */
.album-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 36px 24px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.footer-col strong {
    color: var(--text-main);
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.footer-col p a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-col p a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-copy {
    font-size: 12px;
    color: #94a3b8;
}

/* -------------------------------------------------------------------------
   12. Responsive Adjustments
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .portal-hero {
        padding: 26px 16px 30px;
    }
    .portal-hero-title {
        font-size: 22px;
    }
    .portal-search-form {
        flex-direction: column;
    }
    .btn-search {
        width: 100%;
    }
    .album-toolbar {
        top: 56px;
        flex-direction: column;
        align-items: stretch;
    }
    .view-filter-tabs {
        width: 100%;
        justify-content: space-between;
    }
    .filter-tab {
        flex: 1;
        justify-content: center;
    }
    .action-buttons-group {
        width: 100%;
    }
    .action-buttons-group .btn {
        flex: 1;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .lightbox-btn-label {
        display: none;
    }
    .lightbox-topbar {
        padding: 8px 12px;
        gap: 8px;
    }
    .lightbox-info-group {
        gap: 6px;
        min-width: 0;
        flex: 1;
    }
    .lightbox-counter {
        font-size: 12px;
        padding: 4px 7px;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .lightbox-filename {
        max-width: none !important;
        min-width: 0;
        flex: 1;
        font-size: 11.5px;
        padding: 4px 7px;
        white-space: nowrap !important;
    }
    .lightbox-actions {
        gap: 5px;
        flex-shrink: 0;
    }
    .lightbox-btn {
        padding: 6px 9px;
        font-size: 13px;
    }
    .lightbox-btn-close {
        padding: 4px 8px;
        font-size: 20px;
    }
    .contact-branches-line {
        flex-direction: column;
        gap: 8px;
    }

    /* Webalben Table Mobile */
    .mobile-only-inline {
        display: inline !important;
    }
    .mobile-only-flex {
        display: flex !important;
    }
    .desktop-only-cell {
        display: none !important;
    }
    .webalben-table thead {
        display: none;
    }
    .webalben-table,
    .webalben-table tbody,
    .webalben-table tr.webalben-table-row {
        display: block;
        width: 100%;
    }
    .webalben-table tbody tr.webalben-table-row {
        padding: 12px 14px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    .webalben-table td {
        padding: 0 !important;
    }
    .webalben-table td.col-thumb {
        width: 54px;
        flex-shrink: 0;
    }
    .webalben-table td.col-thumb .webalben-table-thumb {
        width: 54px;
        height: 42px;
    }
    .webalben-table td.col-main {
        flex: 1;
        min-width: 150px;
    }
    .webalben-table td.col-action {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-top: 4px;
        padding-top: 8px !important;
        border-top: 1px dashed #e2e8f0;
    }
    .mobile-meta-bar {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .btn-open-webalbum {
        padding: 6px 14px !important;
        font-size: 12.5px !important;
    }
    .webalben-table td.col-action .btn {
        margin-left: auto;
    }
}

/* =========================================================================
   EMBEDDED MODE (Divi / WordPress ?embed=1)
   ========================================================================= */
html.is-embedded,
body.is-embedded {
    background: transparent !important;
}

body.is-embedded .album-footer {
    display: none !important;
}

body.is-embedded #portal-header-actions {
    display: none !important;
}
