/**
 * Admin styles for Discovery Call Plugin
 */

/* Fix WordPress admin menu display when collapsed */
#adminmenu .wp-submenu li a {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Ensure TriggerVox menu items display properly when collapsed */
#adminmenu .wp-submenu li a[href*="triggervox"] {
    display: block !important;
    white-space: nowrap !important;
}

/* Settings Page */
.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.color-swatch.selected {
    border: 2px solid #000;
    transform: scale(1.1);
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Floating preview button */
.preview-button-container {
    transition: all 0.3s ease;
}

body.admin-bar .preview-button-container {
    top: 82px !important; /* Account for WordPress admin bar */
}

@media screen and (max-width: 782px) {
    body.admin-bar .preview-button-container {
        top: 116px !important; /* Adjust for mobile admin bar */
    }
}

.preview-button-container {
    position: fixed;
    right: 30px;
    top: 45px;
    z-index: 9999;
    display: none;
}

.preview-button-container.show {
    display: block;
}

.preview-button {
    background: #2271b1;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
    transition: all 0.3s ease;
}

.preview-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 113, 177, 0.4);
}

.preview-button:active {
    transform: translateY(0);
}

/* API Status */
.api-status {
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.api-status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.api-status.disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.api-status.testing {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffecb5;
}

/* Test Button */
.test-api-button {
    margin-left: 10px;
    background: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.test-api-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.test-api-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Admin notices styling */
.notice.ecf2248-admin-notice {
    border-left: 4px solid #fb923c;
    background: #fff;
    margin: 20px 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notice.ecf2248-admin-notice.notice-success {
    border-left-color: #10b981;
}

.notice.ecf2248-admin-notice.notice-error {
    border-left-color: #ef4444;
}

.notice.ecf2248-admin-notice.notice-warning {
    border-left-color: #f59e0b;
}

.notice.ecf2248-admin-notice.notice-info {
    border-left-color: #3b82f6;
}

/* Contact page styling */
.ecf2248-contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ecf2248-contacts-header h1 {
    margin: 0;
}

.ecf2248-export-button {
    background: #2271b1;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.ecf2248-export-button:hover {
    background: #135e96;
    color: white;
    text-decoration: none;
}

/* Bulk actions */
.ecf2248-bulk-actions {
    margin: 10px 0;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecf2248-bulk-actions select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ecf2248-bulk-actions .button {
    padding: 6px 12px;
}

/* Contacts table */
.ecf2248-contacts-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ecf2248-contacts-table th {
    background: #f9fafb;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.ecf2248-contacts-table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.ecf2248-contacts-table tr:hover {
    background: #f9fafb;
}

.ecf2248-contacts-table tr:last-child td {
    border-bottom: none;
}

/* Empty state */
.ecf2248-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.ecf2248-empty-state .dashicons {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.ecf2248-empty-state h3 {
    margin: 0 0 10px;
    color: #374151;
}

.ecf2248-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Pagination */
.ecf2248-pagination {
    margin: 20px 0;
    text-align: center;
}

.ecf2248-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #2271b1;
    transition: all 0.2s;
}

.ecf2248-pagination .page-numbers:hover,
.ecf2248-pagination .page-numbers.current {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.ecf2248-pagination .page-numbers.dots {
    border: none;
    color: #6b7280;
}

.ecf2248-pagination .page-numbers.dots:hover {
    background: none;
    color: #6b7280;
}

/* =================
   CONTACTS PAGE PAGINATION STYLES 
   ================= */

/* Pagination Container */
.tablenav.bottom {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 2px solid #e5e7eb;
    background: linear-gradient(to bottom, #fafafa 0%, #ffffff 100%);
}

.tablenav-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Pagination Links Container */
.pagination-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Paging Input Container */
.paging-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px;
}

/* Page Number Buttons */
.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.page-numbers:hover {
    background: #f9fafb;
    border-color: #fb923c;
    color: #fb923c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.15);
}

.page-numbers.current {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    border-color: #fb923c;
    color: white;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.3);
}

.page-numbers.current:hover {
    transform: none;
}

/* Dots Separator */
.page-numbers.dots {
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: default;
    box-shadow: none;
    font-weight: 600;
    min-width: 24px;
}

.page-numbers.dots:hover {
    background: transparent;
    border: none;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Navigation Buttons (First, Previous, Next, Last) */
.first-page.button,
.prev-page.button,
.next-page.button,
.last-page.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.first-page.button:hover,
.prev-page.button:hover,
.next-page.button:hover,
.last-page.button:hover {
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
    border-color: #fb923c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.3);
}

/* Disabled Navigation Buttons */
.tablenav-pages-navspan.button.disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #d1d5db;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

/* Total Pages Text */
.total-pages-text {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    height: 36px;
    white-space: nowrap;
}

/* Screen Reader Text */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design for Pagination */
@media (max-width: 782px) {
    .tablenav.bottom {
        padding: 10px 0;
    }
    
    .tablenav-pages {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .paging-input {
        margin: 5px 0;
    }
    
    .total-pages-text {
        width: 100%;
        justify-content: center;
        margin: 10px 0 0 0;
    }
    
    .page-numbers,
    .first-page.button,
    .prev-page.button,
    .next-page.button,
    .last-page.button,
    .tablenav-pages-navspan.button.disabled {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* Animation for pagination */
@keyframes fadeInPagination {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tablenav.bottom {
    animation: fadeInPagination 0.3s ease-out;
}

/* Form field styling */
.ecf2248-form-field {
    margin-bottom: 20px;
}

.ecf2248-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #374151;
}

.ecf2248-form-field input,
.ecf2248-form-field textarea,
.ecf2248-form-field select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.ecf2248-form-field input:focus,
.ecf2248-form-field textarea:focus,
.ecf2248-form-field select:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.ecf2248-form-field .description {
    margin-top: 5px;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Card styling */
.ecf2248-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ecf2248-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
}

/* Success/Error states */
.ecf2248-success {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.ecf2248-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.ecf2248-warning {
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.ecf2248-info {
    color: #1e40af;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

/* =================
   SETTINGS PAGE STYLES 
   ================= */

/* Integration Mode Box Container */
.integration-mode-box {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.integration-mode-box:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.integration-mode-header {
    margin-bottom: 25px;
    text-align: left;
}

.integration-mode-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    text-align: left;
}

.integration-mode-header p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
    text-align: left;
}

/* Integration Mode Tabs Container */
.integration-mode-tabs-container {
    margin: 25px 0;
}

.integration-mode-tabs {
    display: flex;
    gap: 12px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.integration-tab-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.integration-mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    color: #6b7280;
    position: relative;
    min-height: 50px;
}

.integration-mode-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #374151;
}

.integration-tab-radio:checked + .integration-mode-tab,
.integration-mode-tab-active {
    background: #ffffff;
    color: #fb923c;
    border-color: #fb923c;
    box-shadow: 0 2px 8px rgba(251, 146, 60, 0.2);
}

.integration-tab-icon {
    font-size: 20px;
    line-height: 1;
}

.integration-tab-label {
    font-weight: 600;
}

.integration-tab-lock-icon {
    font-size: 14px;
    margin-left: 4px;
    opacity: 0.7;
}

.integration-tab-locked {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.integration-tab-locked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    pointer-events: none;
}

.integration-tab-radio:disabled + .integration-mode-tab {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modern Horizontal Toggle Switch - Keep for backward compatibility but hide */
.integration-toggle-container {
    display: none; /* Hide old toggle, use tabs instead */
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    justify-content: flex-start;
}

.toggle-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    text-align: center;
}

.toggle-option-label.left {
    order: 1;
}

.integration-toggle-switch {
    order: 2;
    position: relative;
}

.toggle-option-label.right {
    order: 3;
}

.toggle-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}

.toggle-text {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    line-height: 1.3;
}

.integration-toggle-switch {
    position: relative;
    width: 140px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 25px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

.integration-toggle-switch:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.integration-toggle-switch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 66px;
    height: 42px;
    background: #fb923c;
    border-radius: 21px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.integration-toggle-switch input[type="radio"]:checked#triggervox_integration_mode_form ~ .toggle-slider {
    transform: translateX(68px);
}

.toggle-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: auto; /* Changed from 'none' to 'auto' to allow clicks */
}

.toggle-label-left,
.toggle-label-right {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    transition: color 0.3s ease;
    z-index: 10;
    position: relative;
    cursor: pointer; /* Add cursor pointer to indicate clickable */
}

.integration-toggle-switch input[type="radio"]:checked#triggervox_integration_mode_button ~ .toggle-labels .toggle-label-left,
.integration-toggle-switch input[type="radio"]:checked#triggervox_integration_mode_form ~ .toggle-labels .toggle-label-right {
    color: white;
}

.toggle-description {
    margin-top: 20px;
    text-align: left;
}

.toggle-description p {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
}

/* Active state for option labels */
.integration-toggle-container.button-active .toggle-option-label.left .toggle-text,
.integration-toggle-container.form-active .toggle-option-label.right .toggle-text {
    color: #fb923c;
    font-weight: 700;
}

.integration-toggle-container.button-active .toggle-option-label.left .toggle-icon,
.integration-toggle-container.form-active .toggle-option-label.right .toggle-icon {
    transform: scale(1.15);
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(251, 146, 60, 0.3));
}

/* Upgrade message and lock functionality */
.upgrade-message {
    margin-top: 20px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    text-align: center;
    display: none; /* Initially hidden */
}

/* Show upgrade message when user doesn't have access */
.no-form-access .upgrade-message {
    display: block;
}

.upgrade-message p {
    margin: 0 0 15px 0;
    color: #856404;
    font-weight: 600;
}

.upgrade-lock {
    display: inline-block;
    margin-left: 8px;
    font-size: 16px;
    opacity: 0.8;
}

.verify-button {
    background: #fb923c !important;
    border-color: #fb923c !important;
    color: white !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

.verify-button:hover {
    background: #ea580c !important;
    border-color: #ea580c !important;
    transform: translateY(-1px);
}

.verify-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.verification-status {
    margin-top: 10px;
    display: block;
    width: 100%;
}

.verification-status .notice {
    padding: 8px 12px;
    margin: 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.verification-status .notice.inline {
    display: block;
    margin: 0;
    width: 100%;
}

/* Success message styling */
.verification-success-message {
    display: block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #10b981;
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reloading message styling */
.reloading-message {
    display: block;
    margin-top: 5px;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    animation: fadeIn 0.3s ease-in;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    width: 100%;
    box-sizing: border-box;
}

/* Disabled form mode styling */
.integration-toggle-switch input[type="radio"]:disabled + .toggle-labels .toggle-label-right {
    color: #9ca3af !important;
    opacity: 0.5;
}

.integration-toggle-container .toggle-option-label.right:has(.upgrade-lock) .toggle-text {
    color: #9ca3af !important;
}

.integration-toggle-container .toggle-option-label.right:has(.upgrade-lock) .toggle-icon {
    opacity: 0.5;
    filter: grayscale(1);
}

/* WordPress Button Overrides for Orange Theme */
.wp-core-ui .button-primary {
    background: #fb923c !important;
    border-color: #fb923c !important;
    color: white !important;
}

.wp-core-ui .button-primary:hover {
    background: #ea580c !important;
    border-color: #ea580c !important;
}

.wp-core-ui .button-primary:focus {
    box-shadow: 0 0 0 1px #fb923c !important;
}

.wp-core-ui .button-primary:active {
    background: #c2410c !important;
    border-color: #c2410c !important;
}

/* Custom orange button styles */
.button-orange {
    background: #fb923c !important;
    border-color: #fb923c !important;
    color: white !important;
}

.button-orange:hover {
    background: #ea580c !important;
    border-color: #ea580c !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .integration-mode-box {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .integration-toggle-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .toggle-option-label {
        order: initial !important;
        min-width: auto;
    }
    
    .toggle-option-label.left {
        order: 1;
    }
    
    .integration-toggle-switch {
        order: 2;
    }
    
    .toggle-option-label.right {
        order: 3;
    }
    
    .integration-mode-header h3 {
        font-size: 18px;
    }
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-button {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-picker-button:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.display-mode-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.display-mode-option {
    cursor: pointer;
}

.display-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.display-mode-visual {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.display-mode-option input[type="radio"]:checked + .display-mode-visual {
    border-color: #fb923c;
    background-color: #fff7ed;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #fb923c;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#color-picker, #button-color-picker, #text-color-picker {
    margin-bottom: 15px;
}

.color-section-label {
    font-weight: 600;
    margin: 15px 0 5px;
    color: #4b5563;
}

.color-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch.selected {
    border: 2px solid #000;
    transform: scale(1.1);
}

/* Custom color picker styles */
.color-section-with-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.color-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.custom-color-picker-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    min-width: 50px;
    transition: all 0.2s;
    margin-left: 8px;
}

.custom-color-picker-inline:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.custom-color-picker-inline.selected {
    border-color: #fb923c;
    background: #fff7ed;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

.custom-color-label-inline {
    font-size: 10px;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1;
}

.custom-color-input {
    width: 50px;
    height: 36px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-color-input:hover {
    border-color: #d1d5db;
    transform: scale(1.05);
}

.custom-color-input:focus {
    outline: none;
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);
}

.display-mode-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.display-mode-option {
    flex: 1;
    max-width: 250px;
    cursor: pointer;
}

.display-mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.display-mode-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.2s;
}

.display-mode-option input[type="radio"]:checked + .display-mode-visual {
    border-color: #f97316;
    background-color: #fff7ed;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.mode-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.mode-description {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

/* Phone Notification Styles */
.phone-notification {
    margin: 20px 0;
    padding: 20px;
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-text {
    flex: 1;
}

.notification-text strong {
    display: block;
    color: #1e40af;
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.notification-text p {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.notification-link {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.notification-link:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.notification-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.notification-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.notification-button {
    display: inline-block;
    background: #10b981;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
}

.notification-button:hover {
    background: #059669;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.notification-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.notification-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive design for phone notification */
@media (max-width: 768px) {
    .notification-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .notification-icon {
        margin-top: 0;
    }
    
    .notification-text strong {
        text-align: center;
    }
    
    .notification-text p {
        text-align: center;
    }
}

/* Enhanced verification status messages */
.verification-status .notice {
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.4s ease-out;
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.verification-status .notice.notice-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    border-top: 1px solid #10b981;
    border-right: 1px solid #10b981;
    border-bottom: 1px solid #10b981;
}

.verification-status .notice.notice-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-top: 1px solid #f59e0b;
    border-right: 1px solid #f59e0b;
    border-bottom: 1px solid #f59e0b;
}

.verification-status .notice.notice-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    border-top: 1px solid #ef4444;
    border-right: 1px solid #ef4444;
    border-bottom: 1px solid #ef4444;
}

.verification-status .notice.notice-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 4px solid #3b82f6;
    border-top: 1px solid #3b82f6;
    border-right: 1px solid #3b82f6;
    border-bottom: 1px solid #3b82f6;
}

/* Success message special styling */
.verification-status .notice.notice-success .notice-success {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Phone verification success animation */
.phone-verification-success {
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Phone verification message styling */
.verification-message {
    margin-top: 10px;
    animation: fadeInUp 0.3s ease-out;
    width: 100%;
    min-height: 20px;
    display: none; /* Default state */
}

.verification-message[style*="display: block"] {
    display: block !important;
}

.verification-message .notice {
    margin: 0;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.4;
    display: block !important;
}

.verification-message .notice p {
    margin: 0;
    padding: 0;
    display: block !important;
}

.verification-message .notice.notice-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-top: 1px solid #f59e0b;
    border-right: 1px solid #f59e0b;
    border-bottom: 1px solid #f59e0b;
}

.verification-message .notice.notice-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    border-top: 1px solid #ef4444;
    border-right: 1px solid #ef4444;
    border-bottom: 1px solid #ef4444;
}

.verification-message .notice.notice-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #10b981;
    border-top: 1px solid #10b981;
    border-right: 1px solid #10b981;
    border-bottom: 1px solid #10b981;
}

/* Clean table layout for mode settings */
#triggervox_button_settings .form-table,
#triggervox_form_settings .form-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

/* Settings card styling for consistent appearance */
.ecf2248-settings-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.ecf2248-settings-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

#triggervox_button_settings .form-table th,
#triggervox_button_settings .form-table td,
#triggervox_form_settings .form-table th,
#triggervox_form_settings .form-table td {
    background: transparent;
    border: none;
}

#triggervox_button_settings .form-table th,
#triggervox_form_settings .form-table th {
    width: 240px;
    padding: 16px;
    background: transparent;
    border: none;
    vertical-align: middle;
    color: #1f2937;
}

#triggervox_button_settings .form-table td,
#triggervox_form_settings .form-table td {
    padding: 16px;
    background: transparent;
    border: none;
}

#triggervox_button_settings .form-table .description,
#triggervox_form_settings .form-table .description {
    margin-top: 8px;
    color: #6b7280;
}

#triggervox_button_settings .photo-selection-container,
#triggervox_form_settings .photo-selection-container {
    margin-top: 6px;
}

/* Make color picker + custom appear cohesive */
#button-bg-color-picker .color-section-with-picker,
#button-text-color-picker .color-section-with-picker,
#color-picker .color-section-with-picker,
#button-color-picker .color-section-with-picker,
#text-color-picker .color-section-with-picker {
    align-items: center;
}

/* Ensure swatch checkmark is centered and visible */
#triggervox_button_settings .color-swatch,
#triggervox_form_settings .color-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Tighten spacing in mode settings */
#triggervox_mode_settings h3 { margin-bottom: 8px; }

/* Layout width constraints for main sections */
#triggervox_setup_status_section,
#triggervox_display_rules_section,
#triggervox_form_loading_controls,
#triggervox_plugin_settings {
    max-width: 960px;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: auto;
}

/* Ensure consistent box styling across all sections */
#triggervox_setup_status_section .form-table,
#triggervox_plugin_settings .form-table,
#triggervox_display_rules_section .form-table,
#triggervox_form_loading_controls .form-table {
    width: 100%;
    max-width: 960px;
    margin-left: 0;
    margin-right: auto;
    border-collapse: separate;
    border-spacing: 0;
}

/* Ensure the integration mode box fits within the container */
.integration-mode-box {
    width: 100%;
    max-width: 960px;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Ensure consistent spacing and appearance for all main sections */
#triggervox_setup_status_section,
#triggervox_plugin_settings,
#triggervox_display_rules_section,
#triggervox_form_loading_controls {
    margin-bottom: 30px;
}

/* Ensure Form Loading Controls section has the same width as Integration Mode box */
#triggervox_form_loading_controls {
    max-width: 960px;
    width: 100%;
    margin-left: 0;
    margin-right: auto;
}

#triggervox_form_loading_controls .ecf2248-settings-card {
    width: 100%;
    max-width: 960px;
    box-sizing: border-box;
    margin: 0 auto;
}

/* Ensure form tables have consistent styling */
.form-table {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Ensure Plugin Status section has consistent left padding */
#triggervox_plugin_status .form-table th {
    padding-left: 20px;
}

/* Ensure Account Setup Status section has consistent styling */
#triggervox_setup_status_section .form-table {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}

/* Remove spacing between Account Setup Status and Plugin Status */
#triggervox_setup_status_section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

#triggervox_setup_status_section + form {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Target any elements between Account Setup Status and Plugin Status */
#triggervox_setup_status_section ~ form,
#triggervox_setup_status_section + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#triggervox_setup_status_section .form-table td {
    padding: 0;
    border: none;
    background: transparent;
}

/* Ensure all form tables within these sections also respect the width constraints */
#triggervox_setup_status_section .form-table,
#triggervox_plugin_settings .form-table,
#triggervox_display_rules_section .form-table,
#triggervox_form_loading_controls .form-table {
    width: 100%;
    max-width: 960px;
    margin-left: 0;
    margin-right: auto;
}

/* Ensure mode settings tables also respect width constraints */
#triggervox_mode_settings .form-table {
    width: 100%;
    max-width: 960px;
    margin-left: 0;
    margin-right: auto;
}

/* Ensure the mode settings container has proper width */
#triggervox_mode_settings {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Ensure Button Settings and Form Settings have proper width */
#triggervox_button_settings,
#triggervox_form_settings {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure Display Rules section content doesn't overflow */
#triggervox_display_rules_section {
    width: 100%;
    max-width: 960px;
    box-sizing: border-box;
    margin: 0 auto;
}

#triggervox_display_rules_section * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure tables within Display Rules don't overflow */
#triggervox_display_rules_section table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

#triggervox_display_rules_section table td,
#triggervox_display_rules_section table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure form tables within mode settings don't overflow */
#triggervox_mode_settings .form-table th {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
}

#triggervox_mode_settings .form-table td {
    width: calc(100% - 240px);
    min-width: 0;
}

/* Ensure color pickers and other elements don't cause horizontal overflow */
#triggervox_mode_settings .color-section-with-picker {
    flex-wrap: wrap;
    gap: 8px;
}

#triggervox_mode_settings .custom-color-picker-inline {
    flex-shrink: 0;
}

/* =================
   ANALYTICS PAGE STYLES 
   ================= */

/* Modern Dashboard Styles */
:root {
    --primary-color: #fb923c;
    --primary-light: rgba(251, 146, 60, 0.1);
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --rounded: 8px;
    --rounded-lg: 12px;
    --transition: all 0.3s ease;
}

.ecf2248-admin-container {
    margin: 20px 20px 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ecf2248-admin-container h1 {
    color: var(--gray-800);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
}

.ecf2248-admin-container h1:before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    margin-right: 12px;
    border-radius: 6px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="white"><path fill-rule="evenodd" d="M3 3a1 1 0 000 2v8a2 2 0 002 2h2.586l-1.293 1.293a1 1 0 101.414 1.414L10 15.414l2.293 2.293a1 1 0 001.414-1.414L12.414 15H15a2 2 0 002-2V5a1 1 0 100-2H3zm11.707 4.707a1 1 0 00-1.414-1.414L10 9.586 8.707 8.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L8 10.414l1.293 1.293a1 1 0 001.414 0l4-4z" clip-rule="evenodd" /></svg>');
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
}

.ecf2248-period-filter {
    background: white;
    padding: 16px;
    border-radius: var(--rounded);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecf2248-period-filter label {
    font-weight: 500;
    margin-right: 8px;
    color: var(--gray-700);
}

.ecf2248-period-selector {
    min-width: 200px;
    padding: 8px 12px;
    border-radius: var(--rounded);
    border: 1px solid var(--gray-300);
    background-color: white;
    font-size: 14px;
    margin-right: 8px;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%234b5563"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>');
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

.ecf2248-period-filter button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--rounded);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.ecf2248-period-filter button:hover {
    background-color: #4338ca;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

/* Stat Cards */
.ecf2248-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ecf2248-stat-card {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.ecf2248-stat-card:hover {
    transform: translateY(-5px);
}

.ecf2248-stat-card-inner {
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.ecf2248-stat-card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    z-index: 1;
}

.ecf2248-stat-card:nth-child(1) .ecf2248-stat-card-inner::after {
    background: var(--primary-color);
}

.ecf2248-stat-card:nth-child(2) .ecf2248-stat-card-inner::after {
    background: var(--success-color);
}

.ecf2248-stat-card:nth-child(3) .ecf2248-stat-card-inner::after {
    background: var(--info-color);
}

.ecf2248-stat-card:nth-child(4) .ecf2248-stat-card-inner::after {
    background: var(--warning-color);
}

.ecf2248-stat-card-icon {
    background: var(--primary-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.ecf2248-stat-card:nth-child(1) .ecf2248-stat-card-icon {
    background: rgba(79, 70, 229, 0.1);
}

.ecf2248-stat-card:nth-child(2) .ecf2248-stat-card-icon {
    background: rgba(16, 185, 129, 0.1);
}

.ecf2248-stat-card:nth-child(3) .ecf2248-stat-card-icon {
    background: rgba(59, 130, 246, 0.1);
}

.ecf2248-stat-card:nth-child(4) .ecf2248-stat-card-icon {
    background: rgba(245, 158, 11, 0.1);
}

.ecf2248-stat-card-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.ecf2248-stat-card:nth-child(1) .ecf2248-stat-card-icon .dashicons {
    color: var(--primary-color);
}

.ecf2248-stat-card:nth-child(2) .ecf2248-stat-card-icon .dashicons {
    color: var(--success-color);
}

.ecf2248-stat-card:nth-child(3) .ecf2248-stat-card-icon .dashicons {
    color: var(--info-color);
}

.ecf2248-stat-card:nth-child(4) .ecf2248-stat-card-icon .dashicons {
    color: var(--warning-color);
}

.ecf2248-stat-card-content h3 {
    margin: 0 0 5px;
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.ecf2248-stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-800);
}

/* Cards & Containers */
.ecf2248-card {
    background: white;
    border-radius: var(--rounded-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
}

.ecf2248-card:hover {
    box-shadow: var(--shadow-lg);
}

.ecf2248-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

.ecf2248-card-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.ecf2248-card-body {
    padding: 20px;
}

.ecf2248-chart-wrapper {
    height: 350px;
    position: relative;
}

.ecf2248-tables-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* Tables */
.ecf2248-analytics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--rounded);
    overflow: hidden;
}

.ecf2248-analytics-table th {
    background: var(--gray-100);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.ecf2248-analytics-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--gray-700);
    transition: var(--transition);
}

.ecf2248-analytics-table tr:last-child td {
    border-bottom: none;
}

.ecf2248-analytics-table tbody tr:hover td {
    background-color: var(--gray-50);
}

/* Cleanup Section */
.ecf2248-cleanup-section {
    margin-top: 30px;
}

.ecf2248-cleanup-section .ecf2248-card {
    border-left: 4px solid var(--danger-color);
}

.ecf2248-cleanup-section .ecf2248-card-header {
    display: flex;
    align-items: center;
    color: var(--gray-800);
}

.ecf2248-cleanup-section .ecf2248-card-header h2:before {
    content: '⚠️';
    margin-right: 8px;
}

.ecf2248-cleanup-section p {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

#ecf2248-cleanup-analytics {
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--rounded);
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#ecf2248-cleanup-analytics:hover {
    background-color: #dc2626;
    box-shadow: var(--shadow);
}

/* Empty States */
.ecf2248-no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ecf2248-no-data:before {
    content: '📊';
    font-size: 36px;
    margin-bottom: 12px;
}

.ecf2248-no-data p {
    font-size: 15px;
    margin: 0;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .ecf2248-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 782px) {
    .ecf2248-stat-cards {
        grid-template-columns: 1fr;
    }
    
    .ecf2248-tables-container {
        grid-template-columns: 1fr;
    }
    
    .ecf2248-period-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ecf2248-period-selector {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .ecf2248-period-filter button {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInAnalytics {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ecf2248-stat-card {
    animation: fadeInAnalytics 0.4s ease-out forwards;
}

.ecf2248-stat-card:nth-child(1) { animation-delay: 0.1s; }
.ecf2248-stat-card:nth-child(2) { animation-delay: 0.2s; }
.ecf2248-stat-card:nth-child(3) { animation-delay: 0.3s; }
.ecf2248-stat-card:nth-child(4) { animation-delay: 0.4s; }

.ecf2248-card {
    animation: fadeInAnalytics 0.5s ease-out forwards;
    animation-delay: 0.5s;
}

/* =================
   INTEGRATIONS PAGE STYLES 
   ================= */

.ecf2248-integrations-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.ecf2248-integration-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 20px;
}

.ecf2248-integration-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ecf2248-integration-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.integration-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.integration-icon {
    font-size: 24px;
    margin-right: 12px;
    color: #fb923c;
}

.integration-header h3 {
    margin: 0;
    flex-grow: 1;
}

.integration-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-unavailable {
    background-color: #fef2f2;
    color: #b91c1c;
}

.integration-description {
    flex-grow: 1;
    margin-bottom: 15px;
}

.integration-actions {
    display: flex;
    justify-content: flex-end;
}

.integration-inactive {
    opacity: 0.7;
}

.integration-settings-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.integration-settings-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.integration-settings-header h2 {
    margin: 0 0 0 20px;
}

.integration-back {
    display: flex;
    align-items: center;
    padding: 8px 12px !important;
}

.integration-back .dashicons {
    margin-right: 5px;
}

.ecf2248-settings-section {
    margin-bottom: 30px;
}

.ecf2248-settings-section h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* =================
   DISPLAY RULES PAGE STYLES 
   ================= */

.display-rules-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.display-rule-option {
    cursor: pointer;
}

.display-rule-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.display-rule-visual {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
}

.display-rule-option input[type="radio"]:checked + .display-rule-visual {
    border-color: #fb923c;
    background-color: #fff7ed;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.15);
}

.rule-icon {
    font-size: 24px;
    margin-right: 15px;
}

.rule-label {
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.rule-description {
    font-size: 13px;
    color: #6b7280;
}

.url-input-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.url-input-container h3 {
    margin: 0 0 10px;
    font-size: 16px;
    color: #374151;
}

.url-input-container textarea {
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.2s;
}

.url-input-container textarea:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

/* =================
   INTEGRATION TEMPLATES STYLES 
   ================= */

/* WPForms integration styles */
.wpforms-form-selector {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.wpforms-form-option {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.wpforms-form-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Contact Form 7 integration styles */
.cf7-form-selector {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 10px;
}

.cf7-form-option {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.cf7-form-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Photo Preview Styles */
.photo-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
    margin-top: 8px;
    cursor: pointer;
}

.photo-option.selected .photo-preview {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.15);
}

.photo-option:hover .photo-preview {
    border-color: #d1d5db;
    transform: scale(1.05);
}

.photo-option {
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-option.selected {
    transform: scale(1.02);
}

.photo-option input[type="radio"] {
    margin-bottom: 8px;
}