﻿/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Page Title */
.tb-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */
.tb-container {
    display: grid;
    grid-template-columns: 400px 400px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.tb-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: var(--text);
    width: 100%;
    display: block;
}

.tb-section-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: var(--text);
}

.tb-column {
    display: flex;
    flex-direction: column;
}

.tb-presets,
.tb-controls {
    height: 100%;
}
/* ============================================================
   PRESET THEMES CARD
   ============================================================ */
.tb-presets {
    background: var(--surface);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Preset Buttons */
.tb-presets-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
    margin-top: 0.5rem;
}

.tb-preset-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

    .tb-preset-btn:hover {
        background: var(--primary);
        color: var(--primary-contrast);
        border-color: var(--primary);
    }

.tb-presets-buttons button {
    flex-shrink: 0;
}

/* ============================================================
   THEME CONTROLS CARD
   ============================================================ */
.tb-controls {
    background: var(--surface);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.tb-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

    .tb-control-group label {
        font-weight: 600;
        color: var(--text);
    }

    .tb-control-group input[type="color"],
    .tb-control-group select {
        padding: 0.4rem;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: var(--surface);
        cursor: pointer;
    }

/* Action Buttons */
.tb-action-row {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.tb-save-btn {
    background: var(--primary);
    color: var(--primary-contrast);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

    .tb-save-btn:hover {
        background: var(--accent);
        color: var(--accent-contrast);
    }

/* ============================================================
   PREVIEW PANEL
   ============================================================ */
.tb-preview-wrapper {
    grid-column: span 1;
}

.tb-preview-card {
    padding: 0;
    overflow: hidden;
}

.tb-preview-frame {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.tb-preview-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

/* ============================================================
   SHARED THEMES GRID
   ============================================================ */
.tb-shared-wrapper {
    grid-column: span 3;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.tb-gallery-title {
    grid-column: span 3;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.tb-theme-gallery {
    grid-column: span 3;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.tb-theme-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.tb-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
}

.tb-modal-content {
    background: var(--surface);
    padding: 2rem;
    border-radius: 10px;
    width: 360px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.tb-modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tb-delete-btn {
    background: #c0392b;
    color: #fff;
}

    .tb-delete-btn:hover {
        background: #a93226;
    }

.tb-cancel-btn {
    background: #bdc3c7;
}

    .tb-cancel-btn:hover {
        background: #a6acaf;
    }
