/**
 * Settings Page Styles
 * Ask Junkie - AI Chatbot
 */

/* Tab Navigation */
.gemini-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e2e8f0;
}

.gemini-tab {
    padding: 14px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -2px;
}

.gemini-tab:hover {
    background: #f1f5f9;
    color: #334155;
}

.gemini-tab.active {
    background: #fff;
    color: #6366f1;
    border-bottom: 2px solid #fff;
}

.gemini-tab-icon {
    font-size: 18px;
}

/* Tab Content */
.gemini-tab-content {
    display: none;
    background: #fff;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.gemini-tab-content.active {
    display: block;
    position: relative;
    z-index: 1;
}

/* Sections within tabs */
.gemini-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.gemini-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.gemini-section h3 {
    margin: 0 0 16px;
    color: #1e293b;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Fields */
.gemini-field {
    margin-bottom: 20px;
}

.gemini-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.gemini-field input[type="text"],
.gemini-field input[type="password"],
.gemini-field textarea,
.gemini-field select {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.gemini-field textarea {
    min-height: 100px;
    resize: vertical;
}

.gemini-field input:focus,
.gemini-field textarea:focus,
.gemini-field select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gemini-field .description {
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
}

/* Toggle/Checkbox */
.gemini-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gemini-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Info/Warning Boxes */
.gemini-info-box {
    background: #f0f9ff;
    border-left: 4px solid #6366f1;
    padding: 14px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
}

.gemini-warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 14px;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
}

/* Grid layouts */
.gemini-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gemini-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 768px) {

    .gemini-grid-2,
    .gemini-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Data item checkbox */
.gemini-data-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.gemini-data-item:hover {
    background: #f1f5f9;
    border-color: #6366f1;
}

.gemini-data-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.gemini-data-item label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    font-weight: normal;
}

.gemini-data-item .data-label {
    font-weight: 600;
    color: #1e293b;
}

.gemini-data-item .data-desc {
    font-size: 12px;
    color: #64748b;
}

/* Color presets */
.gemini-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gemini-preset-item {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
}

.gemini-preset-item:hover {
    border-color: #6366f1;
}

.gemini-preset-item.selected {
    border-color: #6366f1;
    background: #f0f0ff;
}

.gemini-preset-item input {
    display: none;
}

.preset-preview {
    width: 100%;
    height: 32px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.preset-name {
    font-size: 11px;
    font-weight: 500;
    color: #475569;
}

/* Position grid */
.gemini-position-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 500px;
}

.position-item {
    cursor: pointer;
    text-align: center;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
}

.position-item:hover {
    border-color: #6366f1;
}

.position-item.selected {
    border-color: #6366f1;
    background: #f0f0ff;
}

.position-item input {
    display: none;
}

.position-preview {
    width: 50px;
    height: 40px;
    background: #f1f5f9;
    border-radius: 4px;
    margin: 0 auto 6px;
    position: relative;
}

.position-preview .dot {
    width: 10px;
    height: 10px;
    background: #6366f1;
    border-radius: 50%;
    position: absolute;
}

.dot.top-left {
    top: 4px;
    left: 4px;
}

.dot.top-right {
    top: 4px;
    right: 4px;
}

.dot.bottom-left {
    bottom: 4px;
    left: 4px;
}

.dot.bottom-right {
    bottom: 4px;
    right: 4px;
}

.position-item span:not(.dot) {
    font-size: 11px;
    color: #475569;
}

/* Submit button */
.gemini-submit-area {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.submit-btn {
    background: #2271b1 !important;
    border: 1px solid #2271b1 !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    border-radius: 4px !important;
    color: white !important;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: #135e96 !important;
    border-color: #135e96 !important;
}

/* Page selection */
.page-selection-grid {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
}

/* Color Mode Selector - Appearance Tab */
.color-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.color-mode-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.color-mode-option:hover {
    border-color: #6366f1;
}

.color-mode-option.selected {
    border-color: #6366f1;
    background: #eef2ff;
}

.color-mode-option input {
    display: none;
}

.color-mode-option span {
    font-weight: 500;
    color: #334155;
}

.color-mode-option.selected span {
    color: #6366f1;
}

.color-options-panel {
    display: none;
    margin-top: 16px;
}

.color-options-panel.active {
    display: block;
}

.custom-color-inputs {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-input-group input[type="color"] {
    width: 50px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
}

.live-preview-box {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.live-preview-box h4 {
    margin: 0 0 16px;
    color: #64748b;
    font-size: 14px;
}

.preview-chatbot {
    width: 320px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.preview-header {
    padding: 16px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-title {
    font-weight: 600;
    font-size: 16px;
}

.preview-status {
    font-size: 12px;
    opacity: 0.8;
}

.preview-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}