/*
 * LYC Memories — Custom Styles
 * Built on Bootstrap 5.3 with a warm teal/orange palette.
 * Overrides Bootstrap defaults so it doesn't look like a stock template.
 */

/* ── CSS Variables / Theme ─────────────────────────────────────────────── */
:root {
    --lyc-primary:      #0d6e6e;   /* deep teal */
    --lyc-primary-dark: #094f4f;
    --lyc-accent:       #f97316;   /* warm orange */
    --lyc-bg:           #f0f4f4;
    --lyc-card-bg:      #ffffff;
    --lyc-text:         #1a2a2a;
    --lyc-muted:        #6b8080;
    --lyc-border:       #d4e4e4;
    --lyc-shadow:       0 2px 12px rgba(13,110,110,.10);
    --lyc-radius:       .75rem;
    --lyc-topbar-h:     60px;
}

/* Override Bootstrap primary with our teal */
.btn-primary             { background-color: var(--lyc-primary); border-color: var(--lyc-primary); }
.btn-primary:hover       { background-color: var(--lyc-primary-dark); border-color: var(--lyc-primary-dark); }
.btn-outline-primary     { color: var(--lyc-primary); border-color: var(--lyc-primary); }
.btn-outline-primary:hover { background-color: var(--lyc-primary); border-color: var(--lyc-primary); color:#fff; }
a                        { color: var(--lyc-primary); }
a:hover                  { color: var(--lyc-primary-dark); }

/* ── Layout Shell ─────────────────────────────────────────────────────── */
body {
    background-color: var(--lyc-bg);
    color: var(--lyc-text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.lyc-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top Bar ──────────────────────────────────────────────────────────── */
.lyc-topbar {
    height: var(--lyc-topbar-h);
    background: linear-gradient(135deg, var(--lyc-primary) 0%, var(--lyc-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.lyc-brand {
    color: #fff !important;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
}
.lyc-brand i { font-size: 1.4rem; }

.lyc-nav-link {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-weight: 500;
    padding: .25rem .5rem;
    border-radius: .4rem;
    transition: background .15s;
}
.lyc-nav-link:hover { background: rgba(255,255,255,.15); color: #fff; }

.lyc-user-btn {
    color: rgba(255,255,255,.9) !important;
    text-decoration: none;
}

/* ── Main content ─────────────────────────────────────────────────────── */
.lyc-main { flex: 1; padding-top: 1.25rem; }
.lyc-footer {
    padding: .75rem 0;
    border-top: 1px solid var(--lyc-border);
    background: var(--lyc-card-bg);
    margin-top: 2rem;
}

/* ── Page headers ─────────────────────────────────────────────────────── */
.lyc-page-title { font-size: 1.5rem; font-weight: 700; color: var(--lyc-text); margin: 0; }
.lyc-section-heading {
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--lyc-muted);
    border-bottom: 2px solid var(--lyc-border);
    padding-bottom: .4rem;
    margin-bottom: .75rem;
}

/* ── Camp cards (home page grid) ──────────────────────────────────────── */
.lyc-camp-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--lyc-card-bg);
    border: 1px solid var(--lyc-border);
    border-radius: var(--lyc-radius);
    padding: .85rem 1.1rem;
    text-decoration: none;
    color: var(--lyc-text);
    min-width: 180px;
    box-shadow: var(--lyc-shadow);
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
.lyc-camp-card:hover {
    border-color: var(--lyc-primary);
    box-shadow: 0 4px 20px rgba(13,110,110,.18);
    transform: translateY(-2px);
    color: var(--lyc-text);
}
.lyc-camp-card--empty { opacity: .65; }
.lyc-camp-card-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--lyc-primary), var(--lyc-accent));
    border-radius: .5rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.lyc-camp-card-info { display: flex; flex-direction: column; line-height: 1.3; }

/* ── Photo grid ───────────────────────────────────────────────────────── */
.lyc-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}

/* ── Photo card ───────────────────────────────────────────────────────── */
.lyc-photo-card {
    border-radius: var(--lyc-radius);
    overflow: hidden;
    background: var(--lyc-card-bg);
    box-shadow: var(--lyc-shadow);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.lyc-photo-card:hover, .lyc-photo-card:focus {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(13,110,110,.2);
    outline: none;
}
.lyc-photo-card--selected { outline: 3px solid var(--lyc-primary); }
.lyc-photo-thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--lyc-bg); }
.lyc-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lyc-photo-badge-row {
    position: absolute; bottom: .4rem; right: .4rem;
    display: flex; gap: .3rem;
}
.lyc-photo-meta { padding: .4rem .6rem; }

/* ── Badges ───────────────────────────────────────────────────────────── */
.lyc-badge-person { background-color: var(--lyc-primary) !important; }
.lyc-badge-tag    { background-color: var(--lyc-accent) !important; }
.lyc-badge-group  { background-color: var(--lyc-primary); color: #fff; }

.lyc-hashtag-pill {
    background: var(--lyc-bg);
    border: 1px solid var(--lyc-border);
    color: var(--lyc-primary);
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .12s;
}
.lyc-hashtag-pill:hover, .lyc-hashtag-pill--active {
    background: var(--lyc-primary);
    color: #fff;
    border-color: var(--lyc-primary);
}

/* ── Photo full view ──────────────────────────────────────────────────── */
.lyc-photo-full-wrap {
    border-radius: var(--lyc-radius);
    overflow: hidden;
    background: #000;
    text-align: center;
}
.lyc-photo-full {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ── Lightbox ─────────────────────────────────────────────────────────── */
.lyc-lightbox { text-align: center; }
.lyc-lightbox-img { max-width: 100%; max-height: 80vh; border-radius: .5rem; object-fit: contain; }

/* ── Sidebar (photo detail page) ─────────────────────────────────────── */
.lyc-sidebar-section { padding: 1rem; background: var(--lyc-card-bg); border-radius: var(--lyc-radius); border: 1px solid var(--lyc-border); }
.lyc-sidebar-heading { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--lyc-muted); margin-bottom: .5rem; }

/* ── Comments ─────────────────────────────────────────────────────────── */
.lyc-comments-list { max-height: 320px; overflow-y: auto; }
.lyc-comment {
    padding: .5rem .6rem;
    border-radius: .4rem;
    background: var(--lyc-bg);
    margin-bottom: .4rem;
    border-left: 3px solid var(--lyc-primary);
}

/* ── Upload ───────────────────────────────────────────────────────────── */
.lyc-upload-zone {
    border: 2px dashed var(--lyc-border);
    border-radius: var(--lyc-radius);
    padding: 2.5rem;
    text-align: center;
    background: var(--lyc-card-bg);
    transition: border-color .15s, background .15s;
}
.lyc-upload-zone--drag {
    border-color: var(--lyc-primary);
    background: rgba(13,110,110,.04);
}
.lyc-upload-list { display: flex; flex-direction: column; gap: .4rem; }
.lyc-upload-item {
    display: flex; align-items: center;
    padding: .5rem .75rem;
    background: var(--lyc-card-bg);
    border: 1px solid var(--lyc-border);
    border-radius: .5rem;
}

/* ── Admin cards ──────────────────────────────────────────────────────── */
.lyc-admin-card {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 1.5rem;
    background: var(--lyc-card-bg);
    border: 1px solid var(--lyc-border);
    border-radius: var(--lyc-radius);
    text-decoration: none;
    color: var(--lyc-text);
    height: 100%;
    box-shadow: var(--lyc-shadow);
    transition: border-color .15s, box-shadow .15s, transform .1s;
}
.lyc-admin-card:hover {
    border-color: var(--lyc-primary);
    box-shadow: 0 4px 20px rgba(13,110,110,.18);
    transform: translateY(-2px);
    color: var(--lyc-text);
}

/* ── Config page ──────────────────────────────────────────────────────── */
.lyc-config-card { border: 1px solid var(--lyc-border); border-radius: var(--lyc-radius); box-shadow: var(--lyc-shadow); }
.lyc-config-card .card-header { background: var(--lyc-bg); border-bottom: 1px solid var(--lyc-border); font-size: .9rem; }

/* ── Login page ───────────────────────────────────────────────────────── */
.lyc-login-body {
    background: linear-gradient(135deg, var(--lyc-primary-dark) 0%, var(--lyc-primary) 60%, var(--lyc-accent) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lyc-login-card {
    background: #fff;
    border-radius: calc(var(--lyc-radius) * 1.5);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    text-align: center;
}
.lyc-login-logo {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--lyc-primary), var(--lyc-accent));
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.8rem;
}
.lyc-login-card .form-label { text-align: left; display: block; }
.lyc-login-card .btn-primary {
    background: linear-gradient(135deg, var(--lyc-primary), var(--lyc-primary-dark));
    border: none;
    font-size: 1rem;
    letter-spacing: .03em;
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.lyc-empty-state { text-align: center; padding: 4rem 1rem; }

/* ── Loading ──────────────────────────────────────────────────────────── */
.lyc-loading { display: flex; justify-content: center; padding: 3rem; }

/* ── Blazor error UI ──────────────────────────────────────────────────── */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0; left: 0; right: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    overflow: hidden;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ── Tag autocomplete suggestion list ────────────────────────────────── */
.lyc-suggestion-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--lyc-card-bg);
    border: 1px solid var(--lyc-border);
    border-top: none;
    border-radius: 0 0 var(--lyc-radius) var(--lyc-radius);
    box-shadow: var(--lyc-shadow);
    max-height: 220px;
    overflow-y: auto;
}
.lyc-suggestion-item {
    padding: .4rem .7rem;
    font-size: .875rem;
    cursor: pointer;
    transition: background .1s;
}
.lyc-suggestion-item:hover { background: var(--lyc-bg); color: var(--lyc-primary); }

/* ── Responsive tweaks ────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .lyc-photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
    .lyc-upload-zone { padding: 1.5rem; }
}
