/* ========================================
   Google Sheets Sync Styles
   ======================================== */

/* Settings Modal */
.google-sheets-settings {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-section {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.settings-section h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1rem;
    color: var(--text);
}

.settings-hint {
    font-size: 0.85rem;
    color: var(--text3);
    margin-bottom: 1rem;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text3);
    margin-top: 0.3rem;
}

.input-hint strong {
    color: var(--primary);
}

/* Status Indicators */
.status-indicator {
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Sheet Names Grid */
.sheet-names-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

/* Modules Checkboxes */
.modules-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Sync Modal */
.sync-modal {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sync-status-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.8rem 1rem;
    background: #d1fae5;
    border-radius: 8px;
}

.sync-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #065f46;
}

/* Sync Options */
.sync-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sync-option {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.sync-option h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.sync-option p {
    font-size: 0.8rem;
    color: var(--text3);
    margin: 0 0 1rem 0;
}

.sync-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.sync-mode-select {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.sync-mode-select label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Sync Progress */
.sync-progress {
    padding: 1rem;
    background: var(--bg);
    border-radius: 8px;
    text-align: center;
}

.sync-progress-text {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

.sync-progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.sync-progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    transition: width 0.3s ease;
}

/* Sync Results */
.sync-results {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}

.sync-results h4 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

.sync-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sync-result-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
}

.sync-result-item.success {
    background: #d1fae5;
}

.sync-result-item.error {
    background: #fee2e2;
}

.sync-result-icon {
    font-size: 1.1rem;
}

.sync-result-module {
    font-weight: 500;
    min-width: 80px;
}

.sync-result-count {
    font-size: 0.85rem;
    color: #065f46;
}

.sync-result-error {
    font-size: 0.85rem;
    color: #991b1b;
}

/* Google Sheets Buttons in Header */
.google-sheets-buttons {
    display: flex;
    gap: 0.3rem;
}

.google-sheets-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* File Upload Area (reuse from programs) */
.google-sheets-settings .file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card);
}

.google-sheets-settings .file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.05);
}

.google-sheets-settings .file-upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.google-sheets-settings .file-upload-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.google-sheets-settings .file-upload-hint {
    font-size: 0.75rem;
    color: var(--text3);
}

/* Responsive */
@media (max-width: 600px) {
    .sync-options {
        grid-template-columns: 1fr;
    }

    .sheet-names-grid {
        grid-template-columns: 1fr;
    }

    .sync-status-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}
