/* Workshops Page Styles v20260221b */

.workshops-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Page Header */
.workshops-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.workshops-header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #101828;
    margin: 0;
}

.workshops-header-text p {
    font-size: 0.875rem;
    color: #667085;
    margin: 4px 0 0;
}

.workshops-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #8B5CF6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.workshops-create-btn:hover {
    background: #7C3AED;
}

.workshops-create-btn svg {
    width: 18px;
    height: 18px;
}

/* Empty State */
.workshops-empty {
    text-align: center;
    padding: 80px 24px;
    background: #FAFAFA;
    border-radius: 12px;
    border: 2px dashed #E5E7EB;
}

.workshops-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #F5F3FF;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
}

.workshops-empty h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px;
}

.workshops-empty p {
    font-size: 0.875rem;
    color: #667085;
    margin: 0 0 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Workshops Table ────────────────────────────────── */

.workshops-table-container {
    background: #FFFFFF;
    border-radius: 12px;
    border: 1.5px solid #E5E7EB;
    overflow: hidden;
}

.workshops-table {
    width: 100%;
    border-collapse: collapse;
}

.workshops-table th {
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
    background: #F9FAFB;
    white-space: nowrap;
}

.workshops-table th:first-child {
    padding-left: 24px;
}

.workshops-table th:last-child {
    padding-right: 24px;
    text-align: right;
}

.workshops-table td {
    padding: 16px;
    font-size: 14px;
    color: #364153;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: middle;
}

.workshops-table td:first-child {
    padding-left: 24px;
}

.workshops-table td:last-child {
    padding-right: 24px;
}

.workshops-table tbody tr:hover {
    background: #F9FAFB;
}

.workshops-row-title {
    font-weight: 600;
    color: #101828;
}

.workshops-row-desc {
    font-size: 0.8rem;
    color: #667085;
    margin-top: 2px;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workshops-row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.workshops-action-btn {
    background: none;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    color: #667085;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.workshops-action-btn:hover {
    background: #F3F4F6;
    color: #101828;
    border-color: #D1D5DB;
}

.workshops-action-delete:hover {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

/* Status Badge */
.workshop-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    text-transform: capitalize;
}

.workshop-status-badge.draft {
    background: #F3F4F6;
    color: #6B7280;
}

.workshop-status-badge.active {
    background: #ECFDF5;
    color: #059669;
}

.workshop-status-badge.completed {
    background: #EEF2FF;
    color: #6366F1;
}

/* ── Inline Editor ─────────────────────────────────── */

.workshops-editor {
    max-width: 1200px;
    margin: 0 auto;
}

.workshops-editor-header {
    margin-bottom: 32px;
}

.workshops-editor-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #101828;
    margin: 16px 0 0;
}

.workshops-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #667085;
    padding: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.workshops-back-btn:hover {
    color: #101828;
}

.workshops-editor-section {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.workshops-editor-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #101828;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #F3F4F6;
}

.workshops-editor-field {
    margin-bottom: 16px;
}

.workshops-editor-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #344054;
    margin-bottom: 6px;
}

.workshops-editor-field input,
.workshops-editor-field select,
.workshops-editor-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #101828;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.workshops-editor-field input:focus,
.workshops-editor-field select:focus,
.workshops-editor-field textarea:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.workshops-editor-field textarea {
    resize: vertical;
    min-height: 80px;
}

.workshops-editor-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.workshops-editor-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Toggle inline (for Is Online) */
.workshops-toggle-inline {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workshops-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    display: inline-block;
    margin-top: 4px;
}

.workshops-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.workshops-toggle-slider {
    position: absolute;
    inset: 0;
    background: #D1D5DB;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.workshops-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.workshops-toggle-switch input:checked + .workshops-toggle-slider {
    background: #8B5CF6;
}

.workshops-toggle-switch input:checked + .workshops-toggle-slider::after {
    transform: translateX(20px);
}

/* Editor Actions */
.workshops-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.workshops-editor-cancel {
    padding: 10px 20px;
    background: #F3F4F6;
    color: #344054;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.workshops-editor-cancel:hover {
    background: #E5E7EB;
}

.workshops-editor-save {
    padding: 10px 24px;
    background: #8B5CF6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.workshops-editor-save:hover {
    background: #7C3AED;
}

.workshops-editor-save:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}

/* Workshop URL Display */
.workshops-url-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workshops-url-input {
    flex: 1;
    background: #F9FAFB !important;
    color: #8B5CF6 !important;
    font-size: 0.8125rem !important;
    cursor: text;
}

.workshops-url-copy,
.workshops-url-open {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #667085;
    transition: all 0.15s;
    flex-shrink: 0;
}

.workshops-url-copy:hover,
.workshops-url-open:hover {
    background: #F3F4F6;
    color: #8B5CF6;
    border-color: #8B5CF6;
}

/* Editor Hint */
.workshops-editor-hint {
    font-size: 0.75rem;
    color: #9CA3AF;
    margin-bottom: 6px;
    margin-top: -2px;
}

/* Row-based input lists (prep questions, materials) */
.workshops-row-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.workshops-row-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.workshops-row-item input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
}
.workshops-row-item input:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}
.workshops-row-item .row-name-input {
    flex: 0.4;
}
.workshops-row-item .row-url-input {
    flex: 0.6;
}
.workshops-row-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #9CA3AF;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.workshops-row-remove:hover {
    color: #EF4444;
    background: #FEF2F2;
}
.workshops-add-row-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: 1px dashed #D1D5DB;
    border-radius: 8px;
    background: none;
    color: #8B5CF6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
}
.workshops-add-row-btn:hover {
    border-color: #8B5CF6;
    background: #F5F3FF;
}

/* Registration Fields Config */
.workshops-reg-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.workshops-reg-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 0.875rem;
}
.workshops-reg-field-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}
.workshops-reg-req {
    font-size: 0.8125rem;
    color: #6B7280;
    font-weight: 400 !important;
}

/* Toast (matches platform standard) */
.settings-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #1A1A1A;
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}
.settings-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.settings-toast.success {
    background: #10B981;
}
.settings-toast.error {
    background: #DC2626;
}

/* Version Badge */
.workshops-version {
    position: fixed;
    bottom: 8px;
    right: 8px;
    font-size: 0.625rem;
    color: #D1D5DB;
    z-index: 1;
}

/* ── Mobile ────────────────────────────────────────── */
@media (max-width: 768px) {
    .workshops-page {
        padding: 20px 16px;
    }

    .workshops-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .workshops-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .workshops-table {
        min-width: 560px;
    }

    .workshops-editor-row,
    .workshops-editor-row-3 {
        grid-template-columns: 1fr;
    }

    .workshops-editor {
        max-width: 100%;
    }
}
