/**
 * Site Designer tab styles — scoped under #cp-tab-site so they never leak
 * into the rest of the dashboard.
 */

/* ── Progress indicator ────────────────────────────────────────────────── */

#cp-tab-site .cp-site-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

#cp-tab-site .cp-site-progress-step {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    color: #9ca3af;
    font-size: 12px;
}

#cp-tab-site .cp-site-progress-step:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin: 0 6px;
}

#cp-tab-site .cp-site-progress-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

#cp-tab-site .cp-site-progress-step-done .cp-site-progress-dot {
    background: #16a34a;
    color: #fff;
}

#cp-tab-site .cp-site-progress-step-active .cp-site-progress-dot {
    background: #2563eb;
    color: #fff;
}

#cp-tab-site .cp-site-progress-step-active,
#cp-tab-site .cp-site-progress-step-done {
    color: #374151;
    font-weight: 500;
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */

#cp-tab-site .cp-site-alert {
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

#cp-tab-site .cp-site-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

#cp-tab-site .cp-site-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
}

#cp-tab-site .cp-site-alert-info a {
    color: #1d4ed8;
    text-decoration: underline;
}

#cp-tab-site .cp-site-plugin-list {
    list-style: disc;
    margin: 6px 0 0 20px;
    padding: 0;
}

#cp-tab-site .cp-site-plugin-list li {
    margin-bottom: 2px;
}

/* ── Deployment task checklist ─────────────────────────────────────────── */

#cp-tab-site .cp-site-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#cp-tab-site .cp-site-task {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    padding: 10px 12px;
}

#cp-tab-site .cp-site-task-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

#cp-tab-site .cp-site-task-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid #d1d5db;
    position: relative;
}

#cp-tab-site .cp-site-task-done .cp-site-task-icon {
    border-color: #16a34a;
    background: #16a34a;
}

#cp-tab-site .cp-site-task-done .cp-site-task-icon::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#cp-tab-site .cp-site-task-icon.cp-site-task-spinning {
    border-color: #2563eb;
    border-top-color: transparent;
    animation: cp-site-spin 0.7s linear infinite;
}

#cp-tab-site .cp-site-task-icon.cp-site-task-error {
    border-color: #dc2626;
}

#cp-tab-site .cp-site-task-icon.cp-site-task-error::after {
    content: '×';
    position: absolute;
    left: 4px;
    top: -3px;
    color: #dc2626;
    font-size: 16px;
    font-weight: 700;
}

@keyframes cp-site-spin {
    to { transform: rotate(360deg); }
}

#cp-tab-site .cp-site-task-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#cp-tab-site .cp-site-task-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

#cp-tab-site .cp-site-task-desc {
    font-size: 11px;
    color: #6b7280;
}

#cp-tab-site .cp-site-task-run {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

#cp-tab-site .cp-site-task-run:hover:not(:disabled) {
    background: #1d4ed8;
}

#cp-tab-site .cp-site-task-run:disabled {
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

#cp-tab-site .cp-site-task-done .cp-site-task-run {
    background: #dcfce7;
    border-color: #dcfce7;
    color: #16a34a;
}

/* ── Back link (deliberately understated — going back is allowed but not
   the encouraged path) ───────────────────────────────────────────────── */

#cp-tab-site .cp-site-back-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
}

#cp-tab-site .cp-site-back-link:hover {
    color: #6b7280;
    text-decoration: underline;
}

/* ── Transcript dropzone ───────────────────────────────────────────────── */

#cp-tab-site .cp-site-dropzone {
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

#cp-tab-site .cp-site-dropzone:hover,
#cp-tab-site .cp-site-dropzone.cp-site-dropzone-active {
    border-color: #93c5fd;
    background: #eff6ff;
}

/* ── Color pickers ─────────────────────────────────────────────────────── */

#cp-tab-site .cp-site-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #374151;
}

#cp-tab-site .cp-site-color-row input[type="color"] {
    width: 36px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
}

/* ── Sitemap / section reordering ──────────────────────────────────────── */

#cp-tab-site .cp-site-sitemap {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#cp-tab-site .cp-site-page {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    padding: 10px 12px;
}

#cp-tab-site .cp-site-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#cp-tab-site .cp-site-page-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

#cp-tab-site .cp-site-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 500;
}

#cp-tab-site .cp-site-sections {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#cp-tab-site .cp-site-section {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #eef0f2;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
}

#cp-tab-site .cp-site-section-type {
    font-weight: 500;
    color: #374151;
    text-transform: capitalize;
    flex-shrink: 0;
}

#cp-tab-site .cp-site-section-goal {
    color: #6b7280;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#cp-tab-site .cp-site-reorder {
    display: inline-flex;
    gap: 2px;
    flex-shrink: 0;
}

#cp-tab-site .cp-site-reorder button {
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #4b5563;
    padding: 0;
}

#cp-tab-site .cp-site-reorder button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

#cp-tab-site .cp-site-reorder button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
