/* Auth Section */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

#login-section a {
    text-decoration: none;
}

/* Buttons */
button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-message {
    position: relative;
    padding: 4px 112px 4px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
    border-left: 3px solid transparent;
    transition: background 0.1s ease;
}

/* Dedicated "pop up" action (pin) — replaces the old row-wide click. */
.pop-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 32px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

/* Mouse devices: highlight the row + reveal the pin on hover. */
@media (hover: hover) {
    .chat-message:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: var(--accent);
    }

    .chat-message:hover .pop-btn {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Touch devices (no hover): keep the pin visible with a larger hit area. */
@media (hover: none) {
    .pop-btn {
        opacity: 1;
        pointer-events: auto;
        width: 100px;
        height: 40px;
        right: 4px;
    }
}

/* Keep the pin vertically centered on hover (overrides the generic button
   hover transform, which would otherwise shift it off-center). */
.chat-message .pop-btn:hover {
    background-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-50%);
    box-shadow: none;
}

button:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(145, 70, 255, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.btn-success { background-color: var(--success); color: #000; }
.btn-success:hover:not(:disabled) { background-color: #00c853; box-shadow: 0 4px 15px rgba(0,230,118,0.3); }

.btn-warning { background-color: var(--warning); color: #000; }
.btn-warning:hover:not(:disabled) { background-color: #ff8f00; box-shadow: 0 4px 15px rgba(255,179,0,0.3); }

.btn-danger { background-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background-color: #d32f2f; box-shadow: 0 4px 15px rgba(239,83,80,0.3); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
    box-shadow: none;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-input);
    box-shadow: none;
    transform: none;
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px;
    margin: 0 auto 20px auto;
    max-width: 850px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.card.active {
    display: block;
}

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

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.sub-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.sub-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--accent);
}

/* Collapsible celebration editor */
.celeb-collapse {
    margin-top: 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-input);
    padding: 14px 20px;
}

.celeb-collapse > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    padding: 4px 0;
}

.celeb-collapse-body {
    margin-top: 12px;
}

.celeb-sub {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    padding: 12px 16px;
    margin-top: 10px;
}

.celeb-sub > summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--accent);
    padding: 2px 0;
}

.celeb-sub[open] > summary {
    margin-bottom: 12px;
}

/* Form Elements */
.input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-main);
    border-radius: 8px;
    border: 1px solid var(--border);
    gap: 10px;
}

.input-group label {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

input[type="number"],
input[type="text"],
select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

input[type="number"] { width: 100px; }
input[type="text"] { width: 220px; }
select { width: 220px; }

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(145, 70, 255, 0.2);
}

input[type="color"] {
    width: 50px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

/* Fill the row so the 300-step position sliders (-100..200) are wide enough to
   land on a precise value (a 150px track meant 0.5px per step, which made
   values skip and jump on release). */
input[type="range"] {
    accent-color: var(--accent);
    flex: 1 1 auto;
    min-width: 0;
}

/* Slider value labels: fixed right-aligned width + tabular digits so the track
   doesn't reflow (jiggle) while dragging as the text width changes. */
.input-group span[id$="-label"] {
    min-width: 48px;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

input[type="checkbox"] {
    accent-color: var(--accent);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

