/* Export Mode Styles */
.hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.export-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stage-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    text-align: center;
}

.cancel-button {
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.cancel-button:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.cancel-button:active {
    transform: scale(0.98);
}

/* ===== Batch Export Styles ===== */
.batch-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    line-height: 1.5;
}

.batch-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 8px;
}

.batch-chip-container::-webkit-scrollbar {
    width: 4px;
}

.batch-chip-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.batch-chip {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    white-space: nowrap;
}

.batch-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.batch-chip.selected {
    background: rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    color: #ffffff;
    font-weight: 600;
}

.batch-select-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.batch-select-btn {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.batch-select-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.batch-summary {
    text-align: center;
    padding: 10px;
    margin: 12px 0;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.batch-summary #batch-total-count {
    color: #667eea;
    font-size: 16px;
}

.batch-export-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.batch-export-button:hover:not(:disabled) {
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.batch-progress-panel {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.batch-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.batch-progress-header span:first-child {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
}

#batch-progress-count {
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    background: rgba(102, 126, 234, 0.15);
    padding: 3px 10px;
    border-radius: 12px;
}

.batch-jobs-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.batch-jobs-list::-webkit-scrollbar {
    width: 4px;
}

.batch-jobs-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.batch-job-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 11px;
    transition: background 0.2s ease;
}

.batch-job-item.active {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.batch-job-item.done {
    opacity: 0.6;
}

.batch-job-item.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.batch-job-status {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 12px;
}

.batch-job-name {
    flex: 1;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-job-progress {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.batch-overall-progress {
    margin-top: 8px;
}

/* ===== Batch Count & Vary Options ===== */
.batch-count-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.batch-count-input {
    width: 70px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.batch-count-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.batch-count-input::-webkit-inner-spin-button,
.batch-count-input::-webkit-outer-spin-button {
    opacity: 1;
}

.batch-vary-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.batch-vary-check {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}

.batch-vary-check:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.batch-vary-check input[type="checkbox"] {
    accent-color: #667eea;
    cursor: pointer;
}

.batch-vary-check span {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ===== Batch History Info ===== */
.batch-history-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.batch-history-info #batch-history-count {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.batch-clear-history-btn {
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    color: rgba(239, 68, 68, 0.8);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.batch-clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* ===== AI Mode Styles ===== */
.mode-toggle-container {
    padding: 0 4px;
    margin-bottom: 12px;
}

.mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    gap: 3px;
}

.mode-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}

.mode-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
}

.mode-toggle-btn.active {
    background: rgba(102, 126, 234, 0.25);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.ai-panel {
    padding: 0 4px;
    margin-bottom: 12px;
    animation: fadeSlideIn 0.3s ease;
}

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

.ai-prompt-input {
    width: 100%;
    min-height: 50px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ai-prompt-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.ai-prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.ai-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ai-generate-btn {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-generate-btn:hover:not(:disabled) {
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.ai-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-status {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.ai-result {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    animation: fadeSlideIn 0.3s ease;
}

.ai-result-header {
    font-size: 11px;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ai-result-details {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.ai-result-details span {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 3px 2px 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

/* API Key eye toggle */
.api-key-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input {
    flex: 1;
    padding-right: 40px !important;
}

.api-key-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    outline: none;
}

.api-key-toggle:hover {
    opacity: 0.9;
}