/* Workspace Page */
#workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Workspace Container */
.workspace-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 3px;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

/* Mode Containers */
.mode-container {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.mode-container.active {
    display: flex;
}

/* Shared Header Actions Wrapper */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Section Header Label & Separator */
.section-header-label {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-right: 12px;
    font-family: 'Calibri', 'Roboto', sans-serif;
    display: flex;
    align-items: center;
}

.section-header-separator {
    color: #d1d5db;
    margin-right: 5px;
    font-weight: 300;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.editor-header-actions-wrapper,
.qc-header-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Account Dropdown Styles */
.workspace-account-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.workspace-account-dropdown {
    position: relative;
    min-width: 180px;
}

.workspace-account-dropdown.min-w-150 {
    min-width: 140px;
}

.workspace-account-display {
    width: 100%;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-family: 'Calibri', system-ui, -apple-system, sans-serif;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
}

.workspace-account-display:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
    color: #475569;
}

.workspace-account-display:focus {
    outline: none;
    border-color: #cbd5e1;
}

.workspace-account-display-icon {
    font-size: 11px;
    color: #64748b;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.workspace-account-dropdown.open .workspace-account-display-icon {
    transform: rotate(180deg);
    color: #64748b;
}

.workspace-account-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    width: 280px;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    padding: 0;
    z-index: 1000;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
    animation: dropdownSlide 0.15s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#sharedWorkspaceAccountSection #workspaceModeDropdown .workspace-account-panel {
    width: 100%;
}

.workspace-account-dropdown.open .workspace-account-panel {
    display: block;
}

.workspace-account-search {
    position: relative;
    padding: 10px;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.workspace-account-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 11px;
    pointer-events: none;
    z-index: 2;
}

.workspace-account-search-input {
    display: block;
    box-sizing: border-box;
    padding: 6px 10px 6px 34px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #475569;
    width: 100%;
    height: 32px;
    transition: all 0.2s ease;
    background-color: #ffffff;
    box-shadow: none !important;
}

.workspace-account-search-input:focus {
    outline: none !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
}

.workspace-account-search-input::placeholder {
    color: #94a3b8;
}

.workspace-account-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 2px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.workspace-account-item {
    box-sizing: border-box;
    padding: 8px 12px;
    margin: 1px 0;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    color: #64748b;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.workspace-account-item span {
    color: inherit !important;
}

.workspace-account-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.workspace-account-item.selected {
    background-color: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.workspace-account-item.selected:hover {
    background-color: #dbeafe;
}

/* Header Action Buttons (Shared) */
.workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.workspace-header-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workspace-header-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.workspace-header-btn i {
    font-size: 12px;
}

.workspace-header-btn.primary {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #ffffff;
}

.workspace-header-btn.primary:hover {
    background-color: #357abd;
}

/* Search Bar Wrapper */
.workspace-search-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.workspace-search-input {
    width: 100%;
    height: 32px;
    padding: 0 12px 0 34px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    color: #475569;
    transition: all 0.2s ease;
}

.workspace-search-input:focus {
    outline: none;
    border-color: #4a90e2;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.workspace-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}

/* Layout Utilities */
.workspace-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.workspace-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: #f8fafc;
}

.mb-10 {
    margin-bottom: 10px;
}

.ml-auto {
    margin-left: auto;
}

/* Workspace Settings Button */
.workspace-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workspace-settings-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

.workspace-settings-btn i {
    font-size: 14px;
}

.workspace-settings-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* Workspace Settings Modal */
.workspace-settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.2s ease-out;
}

.workspace-settings-modal {
    background-color: #ffffff;
    width: 600px;
    max-width: 90vw;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.workspace-settings-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;

}

.workspace-settings-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-settings-modal-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-family: inherit;

}

.workspace-settings-modal-close-btn:hover {
    background-color: #f1f5f9;
    color: #d14343;

}

.workspace-settings-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header Mode Selector */
.header-mode-selector {
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
}

.header-mode-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
    border: 1px solid transparent;
    background-color: transparent;
}

.header-mode-option:hover {
    color: #475569;
    background-color: #f1f5f9;

}

.header-mode-option i {
    font-size: 14px;
    color: #94a3b8;
}

.header-mode-option.selected {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
    font-weight: 600;
    box-shadow: none;
}

.header-mode-option.selected i {
    color: #2563eb;

}

/* Account Selection Section */
.workspace-settings-account-search {
    position: relative;
    margin-bottom: 12px;
}

.workspace-settings-account-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.workspace-settings-account-search input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.workspace-settings-account-search input:focus {
    border-color: #3b82f6;
}

.workspace-settings-account-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    padding: 2px;
}

.workspace-settings-account-item {
    padding: 10px 12px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-settings-account-item:hover {
    background-color: #f1f5f9;
}

.workspace-settings-account-item.selected {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.workspace-settings-account-item .check-icon {
    display: none;
    color: #2563eb;
}

.workspace-settings-account-item.selected .check-icon {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Change Logs Section */
.change-logs-section {
    display: flex;
    align-items: center;
    background-color: transparent;
    padding: 0;
}

.change-logs-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;

}

.change-logs-container:hover {
    border-color: #cbd5e1;
    color: #475569;
    background-color: #f8fafc;
}

.change-logs-text {
    color: #64748b;
    white-space: nowrap;
}

.export-pdm-text {
    color: #64748b;
    white-space: nowrap;
}

.change-logs-separator {
    color: #cbd5e1;
    margin: 0 10px;
    font-size: 14px;
    font-weight: 300;

}

.settings-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-container:hover {
    border-color: #cbd5e1;
    color: #475569;
    background-color: #f8fafc;
}

.settings-text {
    color: #64748b;
    white-space: nowrap;
}

/* Helper Classes for spacing */
.mr-12 {
    margin-right: 12px;
}

.mr-6 {
    margin-right: 6px;
}

.selected-account-name {
    color: #64748b;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    margin-right: 12px;
}