/* LocLit Groups + Auth styles */

/* ── Group picker modal ────────────────────────────────────────────────────── */

.group-picker-loading,
.group-picker-empty,
.group-picker-error,
.group-picker-success {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.group-picker-error { color: #c00; }
.group-picker-success { color: #1a7a1a; font-size: 16px; }

.group-picker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.group-picker-row--sub {
    padding-left: 20px;
    background: #fafafa;
}

.group-picker-row--selected {
    background: #f0faf0;
}

.group-picker-name {
    font-size: 14px;
    color: #222;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.group-picker-toggle {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: #fff;
    color: #666;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.group-picker-toggle:hover { border-color: #000; color: #000; }
.group-picker-toggle--on {
    border-color: #1a7a1a;
    background: #1a7a1a;
    color: #fff;
    font-size: 14px;
}

/* Footer layout: new group on left, save on right */
.loclit-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
}

.group-new-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    color: #444;
    transition: border-color 0.2s, color 0.2s;
}
.group-new-btn:hover { border-color: #000; color: #000; }

.group-save-btn {
    padding: 8px 22px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}
.group-save-btn:hover:not(:disabled) { background: #333; }
.group-save-btn:disabled { opacity: 0.35; cursor: default; }

/* ── Save button (bookmark icon in gallery) ────────────────────────────────── */

.save-btn { color: grey; text-decoration: none; }
.save-btn:hover { color: black; }
.save-btn.saved i { color: #1a7a1a !important; }

/* ── Account page ─────────────────────────────────────────────────────────── */

.account-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 16px 80px;
}

.account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.account-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
}

.account-signout {
    font-size: 13px;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;
    text-decoration: underline;
}

.groups-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 14px;
}

.new-group-form-inline {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.new-group-form-inline input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.new-group-form-inline button {
    padding: 9px 18px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.group-card {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 18px;
    overflow: hidden;
}

.group-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fafafa;
    border-bottom: 1px solid #efefef;
}

.group-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}
.group-card-name:hover { text-decoration: underline; }

.group-card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.group-card-action-btn {
    font-size: 12px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}
.group-card-action-btn:hover { color: #000; }
.group-card-action-btn.danger:hover { color: #c00; }

.group-card-share {
    font-size: 12px;
    color: #555;
    padding: 6px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-card-share a {
    color: #2a6ebb;
    text-decoration: none;
    word-break: break-all;
}
.group-card-share a:hover { text-decoration: underline; }

.group-card-notes {
    padding: 6px 16px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f5f5f5;
    font-style: italic;
}

.group-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    padding: 12px 16px;
}

.group-item-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    aspect-ratio: 4/3;
}

.group-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.group-item-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.group-item-thumb:hover .group-item-remove { opacity: 1; }

.group-item-notes {
    font-size: 11px;
    color: #777;
    text-align: center;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Public group page ────────────────────────────────────────────────────── */

.public-group-container {
    width: 100%;
    padding-bottom: 80px;
}

.public-group-header {
    padding: 32px 16px 28px;
}

.public-group-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
}

.public-group-notes {
    font-size: 15px;
    color: #555;
    margin-top: 8px;
    font-style: italic;
}

.public-subgroup {
    margin-bottom: 32px;
}

.public-subgroup-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.public-subgroup-notes {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    font-style: italic;
}

.public-items-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 2.5rem 0;
}

.public-item img {
    display: block;
    max-width: 100%;
    max-height: 120vh;
    margin: auto;
}

.public-item-meta {
    padding: 0 8px 8px;
}

.public-item-creator {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2px;
}

.public-item-creator a {
    color: #888;
    text-decoration: none;
}

.public-item-creator a:hover {
    color: #000;
    text-decoration: underline;
}

.public-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
}

.public-item-title a {
    color: #111;
    text-decoration: none;
}

.public-item-title a:hover {
    text-decoration: underline;
}

.public-item-notes {
    font-size: 12px;
    color: #666;
    padding: 6px 8px;
    font-style: italic;
}
