/* ============================================================
   SITE-EDITOR.CSS — giao diện "Chế độ chỉnh sửa" chữ & màu (site-editor.js)
   Chỉ hiện khi Admin/Thành viên bật chế độ chỉnh sửa.
   ============================================================ */

.site-text-editing [data-text-key] {
    outline: 1px dashed rgba(184, 74, 43, 0.45);
    outline-offset: 2px;
    cursor: text;
    transition: outline-color 0.15s ease, background 0.15s ease;
}
.site-text-editing [data-text-key]:hover { outline-color: var(--gold, #B84A2B); }
.site-text-editing [data-text-key]:focus {
    outline: 2px solid var(--gold, #B84A2B);
    background: rgba(184, 74, 43, 0.06);
}

.site-text-toolbar {
    position: fixed;
    z-index: 100000;
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #171513;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(23, 21, 19, 0.3);
}
.site-text-toolbar button,
.site-text-toolbar .site-text-color {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #F5EFE2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    position: relative;
}
.site-text-toolbar button:hover,
.site-text-toolbar .site-text-color:hover { background: rgba(245, 239, 226, 0.15); }
.site-text-color input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.site-theme-panel-btn {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 99999;
    background: #171513;
    color: #FFFDF7;
    border: none;
    padding: 11px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(74, 52, 41, 0.2);
    font-size: 0.85rem;
}

.site-theme-panel {
    position: fixed;
    bottom: 132px;
    right: 24px;
    z-index: 99999;
    width: min(340px, calc(100vw - 32px));
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    background: #FFFDF7;
    color: #171513;
    border: 1px solid #E6D7BC;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 12px 32px rgba(23, 21, 19, 0.2);
    font-size: 0.85rem;
}
.site-theme-panel h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #B84A2B;
}
.site-theme-panel h4:not(:first-child) { margin-top: 18px; }
.site-theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.site-theme-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.site-theme-row input {
    width: 32px;
    height: 28px;
    padding: 0;
    border: 1px solid #E6D7BC;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}
.site-theme-hint {
    margin: 0 0 10px;
    color: #4A3429;
    line-height: 1.5;
}
.site-theme-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.site-theme-actions button {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #B84A2B;
    background: transparent;
    color: #B84A2B;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
}
.site-theme-actions .site-theme-save { background: #B84A2B; color: #FFFDF7; }

.site-editor-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -20px);
    z-index: 100001;
    background: #686B4D;
    color: #FFFDF7;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}
.site-editor-toast.show { opacity: 1; transform: translate(-50%, 0); }
