/*
 * SearchJet Index Settings
 * Companion styles for the index settings page (Dashboard design system).
 */

.searchjet-form-section {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f3f5;
}

.searchjet-form-section:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.searchjet-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.searchjet-section-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 4px;
}

.searchjet-section-header .description {
    color: #6c757d;
    font-size: 13px;
    margin: 0;
    line-height: 1.45;
}

.sj-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.sj-btn-add:hover {
    background: #e9ecef;
    color: #495057;
}

.searchjet-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 48px;
    padding: 14px;
    background: #f8f9fa;
    border: 2px dashed #e9ecef;
    border-radius: 12px;
}

.sj-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    cursor: move;
    transition: all 0.2s ease;
}

.sj-tag:hover {
    border-color: #667eea;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sj-tag-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sj-tag-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.sj-tag-input {
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: #495057;
    width: 120px;
}

.sj-tag-add {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    cursor: pointer;
    border-radius: 50%;
}

.sj-empty-text {
    font-size: 13px;
    color: #6c757d;
    align-self: center;
}

.searchjet-textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'SF Mono', Monaco, monospace;
    color: #495057;
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
}

.searchjet-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.searchjet-help-text {
    font-size: 12px;
    color: #6c757d;
    margin: 8px 0 0;
}

.searchjet-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 24px;
    margin-top: 8px;
    border-top: 1px solid #f1f3f5;
}

.searchjet-save-status {
    font-size: 13px;
    color: #6c757d;
}

.searchjet-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.searchjet-loading-state p {
    margin: 0;
    color: #6c757d;
}

.searchjet-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: searchjet-spin 1s linear infinite;
}

.searchjet-spinner-sm {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

@keyframes searchjet-spin {
    to { transform: rotate(360deg); }
}

.searchjet-tip-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #eef0fb;
    color: #667eea;
    margin-bottom: 14px;
}

.sj-error-message {
    padding: 14px 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    color: #721c24;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .searchjet-section-header {
        flex-direction: column;
        gap: 12px;
    }

    .sj-btn-add {
        width: 100%;
        justify-content: center;
    }

    .searchjet-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .searchjet-form-actions .searchjet-btn {
        width: 100%;
        justify-content: center;
    }
}
