/* ── Collection page specific styles ── */
/* Extends bottle-list.css — do not duplicate shared card/grid styles */

/* Collection cards use div (not <a>) so the link is inside */
.collection-card {
    cursor: default;
}

.collection-card:hover {
    transform: none;
    box-shadow: none;
}

.bottle-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bottle-card-link:hover .bottle-card-name {
    color: var(--action-primary, #C4611B);
}

/* ── Collection metadata (location, price) ────────────────────── */

.collection-meta {
    padding: 0 var(--spacing-md);
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 100px;
}

.meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary, #999);
    font-weight: 500;
}

.meta-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ── Collection controls (quantity, consumed) ──────────────────── */

.collection-controls {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    border-top: 1px solid var(--border-light, #e8e0d4);
    margin-top: var(--spacing-sm);
}

.quantity-controls,
.consumed-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.control-label {
    font-size: 0.8rem;
    color: var(--text-tertiary, #999);
    font-weight: 500;
    min-width: 70px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border-light, #e8e0d4);
    background: var(--bg-surface-alt, #f5f0e8);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.qty-btn:hover {
    background: var(--action-primary, #C4611B);
    border-color: var(--action-primary, #C4611B);
    color: #fff;
}

.qty-value {
    font-size: 1rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    color: var(--text-primary);
}

.consumed-value {
    font-size: 1rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    color: var(--text-primary);
    margin-right: var(--spacing-xs);
}

.consume-btn {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--action-primary, #C4611B);
    background: transparent;
    color: var(--action-primary, #C4611B);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-left: auto;
}

.consume-btn:hover {
    background: var(--action-primary, #C4611B);
    color: #fff;
}

/* ── Filter controls (above grid) ──────────────────────────────── */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--spacing-md, 12px);
    padding: var(--spacing-sm, 8px) var(--spacing-md, 12px);
    margin: 0 0 var(--spacing-md, 12px);
    border: 1px solid var(--border-light, #e8e0d4);
    border-radius: 8px;
    background: var(--bg-surface-alt, #f5f0e8);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary, #6b6258);
    font-weight: 500;
}

.filter-group select {
    padding: 4px 8px;
    border: 1px solid var(--border-light, #e8e0d4);
    border-radius: 4px;
    background: var(--bg-card, #fff);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.filter-group .filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 400;
    padding-bottom: 4px;
}

#filter-clear {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--border-light, #e8e0d4);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
}

#filter-clear:hover {
    background: var(--bg-card, #fff);
}

/* ── Inline qty input on collection card ───────────────────────── */
.qty-input {
    width: 56px;
    padding: 2px 4px;
    border: 1px solid var(--border-light, #e8e0d4);
    border-radius: 4px;
    background: var(--bg-card, #fff);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    margin: 0 6px;
}

.qty-input:focus {
    outline: 1px solid var(--action-primary, #C4611B);
}

/* ── Consume toast notification ────────────────────────────────── */

.consume-toast {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-light, #e8e0d4);
    border-radius: 12px;
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
}

.consume-toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.consume-toast p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.8rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light, #e8e0d4);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-outline:hover {
    background: var(--bg-surface-alt, #f5f0e8);
}

/* ── Responsive ────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .consume-toast {
        flex-direction: column;
        left: var(--spacing-md);
        right: var(--spacing-md);
        transform: none;
    }

    .consume-toast.hidden {
        transform: translateY(20px);
    }

    .collection-controls {
        gap: var(--spacing-xs);
    }
}

/* ── Dark mode ─────────────────────────────────────────────────── */

[data-theme="dark"] .collection-controls {
    border-top-color: var(--border-light, #333);
}

[data-theme="dark"] .qty-btn {
    background: var(--bg-surface-alt, #222);
    border-color: var(--border-light, #333);
    color: var(--text-primary);
}

[data-theme="dark"] .qty-btn:hover {
    background: var(--action-primary, #C4611B);
    border-color: var(--action-primary, #C4611B);
    color: #fff;
}

[data-theme="dark"] .consume-btn {
    border-color: var(--action-primary, #C4611B);
    color: var(--action-primary, #C4611B);
}

[data-theme="dark"] .consume-btn:hover {
    background: var(--action-primary, #C4611B);
    color: #fff;
}

[data-theme="dark"] .consume-toast {
    background: var(--bg-card, #1a1a1a);
    border-color: var(--border-light, #333);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .btn-outline {
    border-color: var(--border-light, #333);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--bg-surface-alt, #222);
}
