/* Template Customizer Styles */
.tl-admin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tl-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tl-tab-btn:hover {
    color: var(--tl-primary, #0073aa);
    background: #f8fafc;
}

.tl-tab-btn.active {
    color: var(--tl-primary, #0073aa);
    border-bottom-color: var(--tl-primary, #0073aa);
}

.tl-tab-content {
    display: none;
}

.tl-tab-content.active {
    display: block;
}

/* Customizer Layout */
.tl-customizer-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    margin-top: 15px;
}

.tl-customizer-sidebar {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

.tl-customizer-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

#tl-custom-templates-list {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.tl-template-item {
    padding: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tl-template-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.tl-template-item.active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.tl-template-name {
    font-weight: 500;
    font-size: 13px;
}

.tl-template-actions {
    display: flex;
    gap: 5px;
}

.tl-template-actions button {
    padding: 2px 6px;
    font-size: 11px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}

.tl-template-actions button:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.tl-customizer-editor {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
}

#tl-template-editor input,
#tl-template-editor textarea {
    width: 100%;
    margin-bottom: 15px;
}

#tl-template-editor textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
}

.tl-customizer-actions {
    display: flex;
    gap: 10px;
}

/* Preview Modal */
.tl-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tl-preview-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.tl-preview-content h3 {
    margin-top: 0;
}

.tl-preview-toc {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
}

.tl-preview-close {
    margin-top: 20px;
    text-align: right;
}