/**
 * Crypto Exchange Manager - Admin Styles
 *
 * @package CryptoExchangeManager
 */

/* ==========================================================================
   SVG & Image Optimizations
   ========================================================================== */

/* Optimize SVG rendering */
img[src$=".svg"] {
    shape-rendering: geometricPrecision;
}

/* Prevent layout shift by reserving space for images */
.cem-country-flag,
.cem-method-logo,
.cem-pm-item-logo img,
.cem-pm-logo img {
    aspect-ratio: 1;
    object-fit: contain;
    background: #f5f5f5;
}

/* Hardware acceleration for smooth scrolling with many images */
.cem-countries-grid,
.cem-methods-grid,
.cem-pm-selector-list,
.cem-tickers-content {
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   Popup Overlay & Base
   ========================================================================== */

.cem-tickers-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cem-tickers-popup {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cem-tickers-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cem-tickers-header h2 {
    margin: 0;
    font-size: 18px;
}

.cem-tickers-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.cem-tickers-close:hover {
    color: #000;
}

.cem-popup-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cem-countries-edit-btn,
.cem-methods-edit-btn {
    padding: 4px 10px !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* ==========================================================================
   Popup Search & Filters
   ========================================================================== */

.cem-tickers-search {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.cem-tickers-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cem-tickers-filters {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cem-tickers-search-wrap {
    flex: 1;
}

.cem-tickers-search-wrap input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ==========================================================================
   Popup Tabs
   ========================================================================== */

.cem-tickers-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.cem-tickers-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.15s ease;
}

.cem-tickers-tab:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.cem-tickers-tab.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.cem-tickers-tab-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 4px;
}

/* ==========================================================================
   Popup Content & Table
   ========================================================================== */

.cem-tickers-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.cem-tickers-table {
    width: 100%;
    border-collapse: collapse;
}

.cem-tickers-table th,
.cem-tickers-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cem-tickers-table th {
    background: #f5f5f5;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.cem-tickers-table tr:hover {
    background: #f9f9f9;
}

.cem-tickers-pair {
    font-weight: 600;
    color: #0073aa;
}

.cem-tickers-volume {
    color: #666;
}

.cem-tickers-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f5f5f5;
    font-size: 13px;
    color: #666;
}

.cem-tickers-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ==========================================================================
   Trust Score Colors
   ========================================================================== */

.cem-trust-green {
    color: #46b450;
}

.cem-trust-yellow {
    color: #ffb900;
}

.cem-trust-red {
    color: #dc3232;
}

/* ==========================================================================
   Clickable Links (Spot Coins, Futures)
   ========================================================================== */

.cem-spot-coins-link,
.cem-futures-link {
    color: #e65100;
    cursor: pointer;
    text-decoration: underline;
}

.cem-futures-symbol {
    font-family: monospace;
}

.cem-spot-coins-link:hover {
    color: #005177;
}

.cem-futures-link:hover {
    color: #bf360c;
}

/* ==========================================================================
   Restricted Countries Popup
   ========================================================================== */

.cem-restricted-countries-link {
    cursor: pointer;
}

.cem-restricted-countries-link:hover {
    text-decoration: underline;
}

.cem-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    padding: 20px;
}

.cem-country-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}

.cem-country-item:hover {
    background: #f0f0f0;
}

.cem-country-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.cem-country-flag-placeholder {
    width: 24px;
    height: 16px;
    background: #ddd;
    border-radius: 2px;
    flex-shrink: 0;
}

.cem-country-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Countries and Regions Sections */
.cem-countries-section,
.cem-regions-section {
    padding: 0 20px 20px;
}

.cem-countries-section:first-child,
.cem-regions-section:first-child {
    padding-top: 20px;
}

.cem-countries-section-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    padding: 10px 12px;
    border-radius: 4px;
    background: #f0f0f0;
}

.cem-countries-section-title--verified {
    background: #e8f5e9;
    color: #2e7d32;
}

.cem-countries-section-title--regions {
    background: #fff3cd;
    color: #856404;
}

.cem-countries-empty {
    font-size: 13px;
    color: #999;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

.cem-countries-section .cem-countries-grid,
.cem-regions-section .cem-regions-grid {
    padding: 0;
}

.cem-regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.cem-region-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.cem-region-item:hover {
    background: #ffe69c;
}

.cem-region-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.cem-region-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cem-countries-popup .cem-tickers-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cem-countries-source a {
    color: #0073aa;
    text-decoration: none;
}

.cem-countries-source a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Payment Methods Popup
   ========================================================================== */

.cem-payment-methods-link {
    cursor: pointer;
}

.cem-payment-methods-link:hover {
    text-decoration: underline;
}

.cem-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    padding: 20px;
}

.cem-method-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    font-size: 13px;
    color: #2e7d32;
    transition: background 0.15s ease;
}

.cem-method-item:hover {
    background: #c8e6c9;
}

.cem-method-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.cem-method-logo-placeholder {
    width: 24px;
    height: 24px;
    color: #81c784;
    font-size: 24px;
    flex-shrink: 0;
}

.cem-method-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Source Links
   ========================================================================== */

.cem-source-link {
    color: #0073aa;
    text-decoration: none;
    max-width: 150px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.cem-source-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Exchange List Table
   ========================================================================== */

.cem-table-wrapper {
    max-height: 80vh;
    overflow: auto;
    position: relative;
    margin-bottom: 24px;
}

.cem-table-wrapper table {
    border-collapse: collapse;
    width: auto;
}

.cem-table-wrapper table th,
.cem-table-wrapper table td {
    white-space: nowrap;
    vertical-align: middle;
    padding: 8px 10px;
    box-sizing: border-box;
    min-width: 60px;
}

.cem-table-wrapper thead {
    display: table-header-group;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 4;
    background: #f0f0f1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cem-table-wrapper thead th {
    background-color: #f0f0f1;
}

.cem-group-row th {
    background-color: inherit;
}

/* ==========================================================================
   Table Thumbnails & Flags
   ========================================================================== */

.cem-table-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f1f1;
}

.cem-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
}

.cem-flag--yes {
    background: #e6f6ec;
    color: #1c7c44;
}

.cem-flag--no {
    background: #fdecea;
    color: #c0392b;
}

.cem-flag--unknown {
    background: #f4f4f4;
    color: #555;
}

.cem-asset-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    background: #e6f6ec;
    color: #1c7c44;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cem-asset-count:hover {
    background: #c8e6c9;
    color: #155724;
    transform: scale(1.05);
}

.cem-url-cell {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Table Column Groups
   ========================================================================== */

.cem-group-header {
    font-weight: 700;
    text-align: center !important;
    padding: 12px 8px;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.cem-group-identifiers {
    background: #e8e8e8;
    color: #333;
}

.cem-group-referral {
    background: #fff8e1;
    color: #d4a017;
}

.cem-group-general {
    background: #f5f5f5;
    color: #424242;
}

.cem-group-fees {
    background: #fff3e0;
    color: #e65100;
}

.cem-group-volume {
    background: #e3f2fd;
    color: #0d47a1;
}

.cem-group-leverage {
    background: #fce4ec;
    color: #880e4f;
}

.cem-group-assets {
    background: #e3f2fd;
    color: #0d47a1;
}

.cem-group-payment {
    background: #e8f5e9;
    color: #2e7d32;
}

.cem-group-features {
    background: #f9fbe7;
    color: #827717;
}

.cem-group-row th {
    z-index: 5;
}

.cem-column-headers th {
    background: #f0f0f1;
}

/* ==========================================================================
   Sticky Columns
   ========================================================================== */

.cem-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    border-right: 2px solid #ddd;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.cem-sticky-col-header {
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 2px solid #ddd;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
}

.cem-column-headers .cem-sticky-col-header {
    z-index: 10;
    background: #f0f0f1;
}

tr:nth-child(odd) .cem-sticky-col {
    background: #f9f9f9;
}

tr:hover .cem-sticky-col {
    background: #f0f6fc;
}

/* ==========================================================================
   API Sync Field Highlighting
   ========================================================================== */

.cem-api-field {
    background: #e3f2fd !important;
}

.cem-api-disabled {
    background: #ffebee !important;
}

tr:nth-child(odd) .cem-api-field {
    background: #d6ebfc !important;
}

tr:nth-child(odd) .cem-api-disabled {
    background: #fce4e4 !important;
}

tr:hover .cem-api-field {
    background: #bbdefb !important;
}

tr:hover .cem-api-disabled {
    background: #ffcdd2 !important;
}

/* ==========================================================================
   Inline Editing & Context Menu
   ========================================================================== */

.cem-editable-cell {
    cursor: pointer;
}

.cem-editable-cell:hover {
    outline: 1px dashed #0073aa;
}

.cem-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    min-width: 150px;
    padding: 4px 0;
}

.cem-context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
}

.cem-context-menu-item:hover {
    background: #f0f6fc;
}

.cem-context-menu-item.cem-danger {
    color: #d63638;
}

.cem-context-menu-item.cem-danger:hover {
    background: #fef0f0;
}

.cem-inline-edit {
    width: 100%;
    padding: 4px 6px;
    border: 2px solid #0073aa;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
}

/* Textarea Modal for multiline editing */
/* Shared Modal Overlay */
.cem-textarea-modal-overlay,
.cem-edit-modal-overlay,
.cem-column-sync-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cem-edit-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    z-index: 100001;
}

.cem-column-sync-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Shared Modal Box */
.cem-textarea-modal,
.cem-edit-modal {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

/* Shared Modal Header */
.cem-textarea-modal-header,
.cem-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    background: #f6f7f7;
}

.cem-textarea-modal-header h3,
.cem-edit-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Shared Modal Close Button */
.cem-textarea-modal-close,
.cem-edit-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}

.cem-textarea-modal-close:hover,
.cem-edit-modal-close:hover {
    color: #d63638;
}

/* Shared Modal Body */
.cem-textarea-modal-body,
.cem-edit-modal-body {
    padding: 20px;
}

/* Shared Modal Hint */
.cem-textarea-hint,
.cem-edit-hint {
    margin: 0 0 10px;
    color: #666;
    font-size: 13px;
}

/* Shared Modal Textarea */
.cem-textarea-input,
.cem-edit-textarea {
    width: 100%;
    min-height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.cem-textarea-input:focus,
.cem-edit-textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

/* Shared Modal Footer */
.cem-textarea-modal-footer,
.cem-edit-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f6f7f7;
}

/* Pros/Cons Popup Styles */
.cem-pros-icon,
.cem-cons-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    margin-right: 8px;
}

.cem-pros-icon {
    background: #00c853;
    color: #fff;
}

.cem-cons-icon {
    background: #ff5252;
    color: #fff;
}

.cem-pros-cons-content {
    padding: 20px;
}

.cem-popup-pros-list,
.cem-popup-cons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cem-popup-pros-list li,
.cem-popup-cons-list li {
    padding: 12px 16px 12px 40px;
    border-bottom: 1px solid #eee;
    position: relative;
    font-size: 14px;
}

.cem-popup-pros-list li:last-child,
.cem-popup-cons-list li:last-child {
    border-bottom: none;
}

.cem-popup-pros-list li::before,
.cem-popup-cons-list li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.cem-popup-pros-list li::before {
    background: #00c853;
}

.cem-popup-cons-list li::before {
    background: #ff5252;
}

/* Edit Modal - unique styles defined in shared section above */

/* ==========================================================================
   Sync Buttons
   ========================================================================== */

.cem-sync-button {
    padding: 4px 8px !important;
    height: auto !important;
    line-height: 1 !important;
    min-height: 0 !important;
}

.cem-sync-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.cem-sync-form {
    margin: 0;
}

.cem-sync-all-btn .dashicons {
    vertical-align: middle;
}

.cem-sync-all-btn.syncing .dashicons {
    animation: cem-spin 1s linear infinite;
}

@keyframes cem-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ID Lookup Page
   ========================================================================== */

.cem-id-lookup-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.cem-id-lookup-section {
    flex: 1;
}

.cem-id-lookup-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.cem-id-lookup-search {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cem-id-lookup-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
}

.cem-id-lookup-table th {
    background: #f0f0f0;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.cem-id-lookup-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.cem-id-lookup-table tr:hover {
    background: #f9f9f9;
}

.cem-id-lookup-table tbody {
    max-height: 600px;
    overflow-y: auto;
    display: block;
}

.cem-id-lookup-table thead,
.cem-id-lookup-table tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.cem-copy-btn {
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

/* ==========================================================================
   Column Sync Buttons
   ========================================================================== */

.cem-column-sync-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    vertical-align: middle;
    color: #0073aa;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.cem-column-sync-btn:hover {
    opacity: 1;
}

.cem-column-sync-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.cem-column-sync-btn.syncing .dashicons {
    animation: cem-spin 1s linear infinite;
}

.cem-column-sync-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Column sync progress overlay */
/* Column Sync Overlay - base styles defined in shared section above */

.cem-column-sync-modal {
    background: #fff;
    border-radius: 8px;
    padding: 30px 40px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cem-column-sync-modal h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.cem-column-sync-modal .dashicons-update {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #0073aa;
    animation: cem-spin 1s linear infinite;
    margin-bottom: 15px;
}

.cem-column-sync-modal p {
    margin: 0;
    color: #666;
}

/* Column Selection Modal */
.cem-column-select-modal {
    background: #fff;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cem-column-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.cem-column-select-header h3 {
    margin: 0;
    font-size: 16px;
}

.cem-column-select-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.cem-column-select-close:hover {
    color: #000;
}

.cem-column-select-body {
    padding: 20px;
}

.cem-column-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.cem-column-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cem-column-checkbox:hover {
    background: #e8f4fc;
    border-color: #0073aa;
}

.cem-column-checkbox input {
    margin: 0;
}

.cem-column-checkbox span {
    font-size: 13px;
}

.cem-column-select-actions {
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.cem-column-select-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* ==========================================================================
   Click-to-copy Shortcode Tags
   ========================================================================== */

.cem-copy-shortcode {
    cursor: pointer;
    position: relative;
    border-bottom: 1px dashed #999;
    transition: color 0.2s;
}

.cem-copy-shortcode:hover {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.cem-copy-feedback {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    animation: cem-fade-in 0.2s ease;
}

@keyframes cem-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   Shortcode Reference Table
   ========================================================================== */

.cem-shortcode-reference {
    margin-top: 30px;
}

.cem-shortcode-reference h3 {
    margin-bottom: 15px;
}

.cem-shortcode-table {
    width: 100%;
    border-collapse: collapse;
}

.cem-shortcode-table th,
.cem-shortcode-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.cem-shortcode-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.cem-shortcode-table tr:hover {
    background: #f9f9f9;
}

.cem-shortcode-table code {
    background: #f0f0f0;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.cem-shortcode-table code:hover {
    background: #e0e0e0;
}

.cem-shortcode-group {
    background: #667eea !important;
    color: white;
}

.cem-shortcode-group td {
    font-weight: 600;
    padding: 8px 12px;
}

/* ==========================================================================
   Region Tags Input
   ========================================================================== */

.cem-region-tags-container {
    max-width: 600px;
}

.cem-region-tags-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.cem-region-tags-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.cem-region-tags-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.cem-region-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 32px;
}

.cem-region-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
}

.cem-region-tag-icon {
    font-size: 12px;
}

.cem-region-tag-name {
    font-weight: 500;
}

.cem-region-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #856404;
    padding: 0;
    line-height: 1;
    margin-left: 4px;
}

.cem-region-tag-remove:hover {
    color: #dc3545;
}
