/*
 * Photos App: bright white gallery in the style of a native photos app —
 * frosted translucent topbar, pill navigation, an indigo→pink gradient for
 * the wordmark and primary actions, generous tile rounding, iOS grays.
 * Mockup reference: design_mockups/03-photos-app.html.
 */
[data-theme="photos-app"] {
    /* Surfaces — pure white page and cards, iOS fill grays */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-hover: #f2f2f7;
    --color-surface-sunken: #e5e5ea;

    /* Text — iOS label grays */
    --color-text: #1c1c1e;
    --color-text-secondary: #3a3a3c;
    --color-text-muted: #8e8e93;
    --color-text-faint: #c7c7cc;

    /* Inverse — the solid-ink active nav pill */
    --color-surface-inverse: #1c1c1e;
    --color-text-inverse: #ffffff;

    /* Borders — hairline separators */
    --color-border-subtle: #f2f2f7;
    --color-border: #e5e5ea;
    --color-border-strong: #d1d1d6;
    --color-border-hover: #8e8e93;

    /* Accent — indigo; the full gradient is the skin-only token below */
    --color-accent: #6366f1;
    --color-accent-hover: #4f46e5;
    --color-accent-soft: #eef2ff;
    --color-accent-soft-text: #4338ca;
    --color-accent-soft-border: #c7d2fe;
    --color-on-accent: #ffffff;

    /* Status — iOS system colors */
    --color-success: #34c759;
    --color-success-hover: #2eb350;
    --color-success-soft: #e3f9e9;
    --color-success-soft-text: #1d7a3a;
    --color-success-soft-border: #c0eecd;
    --color-danger: #ff3b30;
    --color-danger-hover: #e6342a;
    --color-danger-soft: #ffe5e3;
    --color-danger-soft-text: #99231c;
    --color-danger-soft-border: #ffc7c2;
    --color-warning: #ffcc00;
    --color-warning-soft: #fff8d6;
    --color-warning-soft-text: #6e5a00;
    --color-warning-soft-border: #f4e39a;
    --color-info: #5ac8fa;

    /* Neutral action */
    --color-neutral: #8e8e93;
    --color-neutral-hover: #6d6d72;

    --color-disabled-bg: #f2f2f7;
    --color-disabled-text: #aeaeb2;

    /* Shape — generous tile rounding; pills come from the skin */
    --radius-sm: 10px;
    --radius-md: 14px;

    /* Elevation — soft and airy; the accent glow carries primary actions */
    --color-backdrop: rgba(28, 28, 30, 0.4);
    --shadow-navbar: none;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 14px 44px rgba(0, 0, 0, 0.18);
    --shadow-accent: 0 6px 20px color-mix(in srgb, var(--color-accent) 35%, transparent);
    --shadow-inset: inset 0 -1px 0 rgba(0, 0, 0, 0.06);

    /* Wordmark / primary-action gradient — consumed only by the photos-app skin */
    --photos-grad: linear-gradient(135deg, #6366f1, #ec4899);

    /* Component hooks */
    --color-navbar-bg: rgba(255, 255, 255, 0.78);
}


/*
 * Photos App theme skin: structural rules that tokens alone can't express —
 * the frosted topbar, the gradient wordmark and primary buttons, pill-shaped
 * nav links and buttons, and the hover zoom on photo tiles. Every rule is
 * scoped to [data-theme="photos-app"], so this file is inert for other
 * themes; palette values come from tokens.css.
 * Mockup reference: design_mockups/03-photos-app.html.
 *
 * Icons reuse the classic theme's line set via mask + currentColor, so this
 * theme ships no icon files of its own — only a favicon and placeholder.
 * Mask longhands only — the `mask:` shorthand resets mask-image, which the
 * lower-specificity per-icon rules below would then lose.
 */

/* ---- navbar: frosted glass bar, gradient wordmark, pill links ---- */
[data-theme="photos-app"] .navbar {
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: var(--color-border-subtle);
}

/* Brand carries the favicon mark so tab icon and logo match (app convention).
   The gradient is clipped to the wordmark's glyphs; the ::before pseudo has its
   own background, so the mark is unaffected by the text clip. */
[data-theme="photos-app"] .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    background: var(--photos-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="photos-app"] .navbar-brand::before {
    content: "";
    width: 24px;
    height: 24px;
    flex: none;
    background: url("/static/themes/photos-app/favicon.svg") center / contain no-repeat;
}

[data-theme="photos-app"] .nav-link {
    border-bottom: none;
    border-radius: var(--radius-pill);
    padding: 7px 14px;
    margin: 10px 1px;
    font-weight: 500;
    color: var(--color-text-muted);
}

[data-theme="photos-app"] .nav-link:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

[data-theme="photos-app"] .nav-link.active {
    background: var(--color-surface-inverse);
    color: var(--color-text-inverse);
}

[data-theme="photos-app"] .nav-new-page {
    border-bottom: none;
}

/* ---- page-tab edit pencil: hide the ✎ glyph, draw the line icon in a pill ---- */
[data-theme="photos-app"] .nav-page-edit .nav-page-edit-glyph {
    display: none;
}

[data-theme="photos-app"] .nav-page-edit {
    align-self: center;
    border-bottom: none;
    border-radius: var(--radius-pill);
    padding: 8px 10px;
    margin-left: 2px;
    color: var(--color-text-muted);
}

[data-theme="photos-app"] .nav-page-edit::before {
    content: "";
    display: block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask-image: url("/static/themes/classic/icon-edit.svg");
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-image: url("/static/themes/classic/icon-edit.svg");
    mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
}

[data-theme="photos-app"] .nav-page-edit:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

/* ---- page header: bare large title with tight tracking, no panel ---- */
[data-theme="photos-app"] .page-header {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

[data-theme="photos-app"] .page-header h1 {
    letter-spacing: -0.02em;
}

/* ---- buttons: pills; primary actions take the gradient and its glow ---- */
[data-theme="photos-app"] .btn,
[data-theme="photos-app"] .btn-primary,
[data-theme="photos-app"] .btn-secondary,
[data-theme="photos-app"] .btn-danger,
[data-theme="photos-app"] .btn-success,
[data-theme="photos-app"] .btn-outline-primary,
[data-theme="photos-app"] .action-button {
    border-radius: var(--radius-pill);
    font-weight: 600;
}

[data-theme="photos-app"] .btn-primary,
[data-theme="photos-app"] .action-button {
    background: var(--photos-grad);
    box-shadow: var(--shadow-accent);
}

[data-theme="photos-app"] .btn-primary:hover:not(:disabled),
[data-theme="photos-app"] .action-button:hover:not(:disabled) {
    background: var(--photos-grad);
    filter: brightness(1.06);
}

/* ---- panels: white-on-white cards need a hairline + a soft float ---- */
[data-theme="photos-app"] .sidebar,
[data-theme="photos-app"] .photo-sidebar,
[data-theme="photos-app"] .settings-section,
[data-theme="photos-app"] .editor-card,
[data-theme="photos-app"] .widget-card {
    border: var(--border-width) solid var(--color-border-subtle);
    box-shadow: var(--shadow-md);
}

/* ---- photo tiles: quiet until hover, then the photo zooms ---- */
[data-theme="photos-app"] .photo-card {
    border: var(--border-width) solid var(--color-border-subtle);
}

[data-theme="photos-app"] .photo-card img {
    transition: transform 0.25s ease;
}

[data-theme="photos-app"] .photo-card:hover img {
    transform: scale(1.05);
}

/* ---- icons: the default set (components/icons.css), a notch smaller ---- */
[data-theme="photos-app"] .nav-link[data-icon]::before,
[data-theme="photos-app"] .btn[data-icon]::before,
[data-theme="photos-app"] button[data-icon]::before {
    width: 16px;
    height: 16px;
}
