.contact-methods-container { max-width: 1200px; margin: 20px 0; }
.global-settings-section, .global-settings-form-section { background: #fff; padding: 20px; border: 1px solid #c3c4c7; margin-bottom: 20px; border-radius: 4px; }
.global-settings-section h2, .global-settings-form-section h3 { margin-top: 0; color: #1d2327; font-size: 18px; border-bottom: 1px solid #e0e0e0; padding-bottom: 10px; margin-bottom: 20px; }
.setting-item { margin-bottom: 15px; }
.setting-item label { display: flex; align-items: center; font-weight: 500; color: #1d2327; gap: 8px; }
.setting-item .description { margin-top: 8px; color: #646970; font-size: 13px; line-height: 1.5; }
.setting-item textarea { border: 1px solid #ddd; border-radius: 4px; padding: 8px 12px; font-family: inherit; font-size: 13px; line-height: 1.4; resize: vertical; }
.setting-item textarea:focus { border-color: #007cba; box-shadow: 0 0 0 1px #007cba; outline: none; }
.setting-item label:not(:has(input[type="checkbox"])) { display: block; font-weight: 500; margin-bottom: 5px; color: #1d2327; }
.app-selection-section { background: #fff; padding: 20px; border: 1px solid #c3c4c7; margin-bottom: 20px; }
.app-selection-section h2 { margin-top: 0; color: #1d2327; font-size: 18px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 15px; margin-top: 15px; }
.app-item { position: relative; display: flex; flex-direction: column; align-items: center; padding: 15px 10px; border: none; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; background: #fff; }
.app-item:hover { box-shadow: 0 2px 5px rgba(0, 124, 186, 0.2); }
.app-item.selected { }
.app-item.disabled { opacity: 0.5; background: #f6f7f7; cursor: not-allowed; }
.app-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; background-color: #e5e7eb; }
.app-icon .dashicons { display:none; }
.app-icon .app-icon-img { width: 80%; height: 80%; display: block; }
.app-name { font-size: 12px; text-align: center; color: #6b7280; font-weight: 500; }
.app-item.selected .app-icon { background-color: var(--app-color); }
.app-item.selected .app-name { color: #000000; }
.configured-methods-section h2 { margin-top: 0; color: #1d2327; font-size: 18px; }
.configured-methods-list { margin: 20px 0; }
.method-config-item { border: 1px solid #c3c4c7; border-radius: 4px; margin-bottom: 15px; background: #fff; }
.method-header { display: flex; align-items: center; padding: 15px; border-bottom: 1px solid #c3c4c7; background: #f6f7f7; }
.drag-handle { margin-right: 10px; cursor: move; color: #8c8f94; }
.method-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
.method-icon .dashicons { display:none; }
.method-icon .method-icon-img { width: 80%; height: 80%; display:block; }
.method-name { flex: 1; font-weight: 500; color: #1d2327; }
.method-actions { display: flex; gap: 5px; }
.method-actions .button { padding: 4px 8px; min-height: auto; line-height: 1; }
.method-config { padding: 20px; }
.method-config-field { margin-bottom: 15px; }
.method-config-field label { display: block; font-weight: 500; margin-bottom: 5px; color: #1d2327; }
.method-config-field input, .method-config-field textarea { width: 100%; max-width: 400px; }
/* Do not stretch checkboxes */
.method-config-field input[type="checkbox"] { width: 16px; max-width: none; }
.method-config-field .description { margin-top: 5px; color: #646970; font-size: 13px; }
.method-config-field .help-link { color: #2271b1; text-decoration: none; font-size: 13px; }
.method-config-field .help-link:hover { text-decoration: underline; }
.special-button { background: #007cba; color: white; border: 1px solid #007cba; border-radius: 4px; padding: 8px 16px; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.special-button:hover { background: #005a87; border-color: #005a87; color: white; }
.form-actions { border-top: 1px solid #c3c4c7; padding-top: 20px; margin-top: 20px; }
.sortable-placeholder { height: 60px; background: #f0f8ff; border: 2px dashed #007cba; margin-bottom: 15px; border-radius: 4px; }
@media (max-width: 768px) {
  .app-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .method-header { flex-wrap: wrap; gap: 10px; }
  .method-actions { width: 100%; justify-content: flex-end; }
}
.method-settings-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 99998; }
.method-settings-modal-content { position: relative; background: white; margin: 50px auto; padding: 0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.method-settings-modal-header { background: #f8f9fa; padding: 20px 24px; border-bottom: 1px solid #e1e4e8; border-radius: 6px 6px 0 0; display: flex; justify-content: space-between; align-items: center; }
.method-settings-modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: #1d2327; }
.method-settings-modal-close { background: none; border: none; color: #646970; font-size: 18px; cursor: pointer; padding: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.method-settings-modal-close:hover { background: #f0f0f1; color: #1d2327; }
.method-settings-modal-body { padding: 24px; }
.method-settings-field { margin-bottom: 20px; }
.method-settings-field:last-child { margin-bottom: 0; }
.method-settings-field label { display: block; font-weight: 500; margin-bottom: 6px; color: #1d2327; font-size: 14px; }
.method-settings-field input[type="text"], .method-settings-field input[type="color"], .method-settings-field select { width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; line-height: 1.4; background: white; }
.method-settings-field select { cursor: pointer; background-repeat: no-repeat; background-position: right 8px center; background-size: 12px; padding-right: 32px; }
.color-option { display: flex; align-items: center; gap: 8px; }
.color-swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #ddd; display: inline-block; vertical-align: middle; }
#button-color { background-image: none !important; padding-right: 12px !important; position: relative; }
.color-dropdown-wrapper { position: relative; display: inline-block; width: 100%; }
.color-dropdown-display { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; background: white; cursor: pointer; font-size: 14px; line-height: 1.4; }
.color-dropdown-display::after { content: ''; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid #666; }
.color-dropdown-swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #ddd; flex-shrink: 0; }
.color-dropdown-options { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 1000; display: none; max-height: 200px; overflow-y: auto; }
.color-dropdown-option { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #f0f0f0; }
.color-dropdown-option:last-child { border-bottom: none; }
.color-dropdown-option:hover { background-color: #f8f9fa; }
.color-dropdown-option.selected { background-color: #e7f3ff; }
.method-settings-field input[type="color"] { width: 60px; height: 36px; padding: 2px; cursor: pointer; }
.custom-color-wrapper { display: flex; gap: 8px; align-items: center; }
.custom-color-wrapper input[type="color"] { width: 60px; flex-shrink: 0; }
.custom-color-wrapper input[type="text"] { flex: 1; }
.color-field-wrapper { display: flex; align-items: center; gap: 10px; }
.color-preview { width: 36px; height: 36px; border: 1px solid #ddd; border-radius: 4px; display: inline-block; cursor: pointer; }
.image-field-wrapper { display: flex; align-items: center; gap: 12px; }
.image-preview { width: 40px; height: 40px; border: 1px solid #ddd; border-radius: 4px; display: none; object-fit: cover; }
.select-image-btn, .remove-image-btn { padding: 6px 12px; font-size: 13px; line-height: 1.4; border-radius: 3px; cursor: pointer; text-decoration: none; display: inline-block; }
.select-image-btn { background: #0073aa; color: white; border: 1px solid #0073aa; }
.select-image-btn:hover { background: #005177; border-color: #005177; color: white; }
.remove-image-btn { background: #f6f7f7; color: #d63638; border: 1px solid #ddd; margin-left: 8px; display: none; }
.remove-image-btn:hover { background: #f0f0f1; border-color: #999; color: #d63638; }
.method-settings-modal-footer { background: #f8f9fa; padding: 16px 24px; border-top: 1px solid #e1e4e8; border-radius: 0 0 6px 6px; display: flex; justify-content: flex-end; gap: 8px; }
.method-settings-modal-footer .button { padding: 8px 16px; font-size: 14px; line-height: 1.4; border-radius: 3px; cursor: pointer; text-decoration: none; display: inline-block; border: 1px solid; }
.method-settings-modal-footer .button-primary { background: #0073aa; color: white; border-color: #0073aa; }
.method-settings-modal-footer .button-primary:hover { background: #005177; border-color: #005177; color: white; }
.method-settings-modal-footer .button-secondary { background: #f6f7f7; color: #2c3338; border-color: #ddd; }
.method-settings-modal-footer .button-secondary:hover { background: #f0f0f1; border-color: #999; color: #2c3338; }
.configured-methods-section-container { border: 1px solid #c3c4c7; border-radius: 4px; padding: 20px; margin-bottom: 20px; background-color: #fff; }

/* Live preview */
.preview-section { background: #fff; padding: 20px; border: 1px solid #c3c4c7; border-radius: 4px; }
.preview-section h2 { margin-top: 0; color: #1d2327; font-size: 18px; margin-bottom: 16px; }
.contact-methods-preview { border: 1px dashed #c3c4c7; padding: 16px; border-radius: 6px; min-height: 120px; background-color: #fafafa; position: relative; }
.contact-methods-preview .linkflow-chat-block { position: relative; min-height: 540px; }
.contact-methods-preview .linkflow-chat-block .ai-cs-chat-button { position: absolute; }
.contact-methods-preview .linkflow-chat-block .ai-cs-chat-window { position: absolute; }
.contact-methods-preview .preview-empty { color: #8c8f94; font-size: 13px; text-align: center; padding: 20px 0; }
.contact-methods-preview .preview-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.contact-methods-preview .preview-avatar { width: 36px; height: 36px; border-radius: 9999px; object-fit: cover; border: 1px solid #e2e8f0; background: #e5e7eb; }
.contact-methods-preview .preview-title { font-weight: 600; color: #1d2327; }
.contact-methods-preview .preview-message { font-size: 13px; color: #4a5568; margin-bottom: 12px; }
.contact-methods-preview .methods-list { display: flex; gap: 10px; flex-wrap: wrap; }
.contact-methods-preview .method-button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9999px; border: 1px solid #e5e7eb; background: #ffffff; cursor: default; }
.contact-methods-preview .method-icon { width: 20px; height: 20px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; }
.contact-methods-preview .method-icon img { width: 14px; height: 14px; display: block; }
.contact-methods-preview .method-label { font-size: 12px; color: #374151; }


/* Fancy toggle for checkboxes used in contact methods */
.lf-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.lf-toggle-input { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.lf-toggle-track { position: relative; width: 44px; height: 24px; background: #d1d5db; border-radius: 9999px; transition: background-color .2s ease; flex-shrink: 0; }
.lf-toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 9999px; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s ease; }
.lf-toggle-input:checked + .lf-toggle-track { background: #007cba; }
.lf-toggle-input:checked + .lf-toggle-track .lf-toggle-thumb { transform: translateX(20px); }
.lf-toggle-label { font-weight: 500; color: #1d2327; }


