/**
 * Form Sentry CF7 - Complete Modal Styles
 * All modal-related styles consolidated in one file
 * Clean, modern design following WordPress design system
 */

/* =============================================================================
   SIMPLE MODAL APPROACH - MINIMAL OVERRIDES
   ============================================================================= */

/* Only override what's absolutely necessary */

/* =============================================================================
   ENHANCED MODAL CONTAINER & FRAME
   ============================================================================= */

/* Force override any existing modal styles */
.bccs-enhanced-modal .components-modal__frame {
    max-width: 1000px !important;
    width: 95vw !important;
    max-height: 95vh !important;
    border-radius: 16px !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    animation: modalEnhancedFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
    height: auto !important;
}

.bccs-enhanced-modal .components-modal__content {
    padding: 0;
    /* Remove height constraints to let WordPress handle it */
}

/* =============================================================================
   ENHANCED MODAL HEADER
   ============================================================================= */

.enhanced-modal-header {
    flex-shrink: 0;
    padding: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    backdrop-filter: blur(10px);
}

.header-main {
    margin-bottom: 20px;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.entry-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.entry-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.3;
}

.entry-timestamps {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.timestamp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.timestamp-item .dashicons {
    color: #2563eb;
    font-size: 16px;
}

.relative-time {
    font-weight: 600;
    color: #1e1e1e;
}

.full-date {
    color: #64748b;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.header-actions .components-button {
    min-height: 40px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-actions .components-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* =============================================================================
   ENHANCED MODAL CONTENT
   ============================================================================= */

/* Notice */
.enhanced-modal-notice {
    margin: 16px 32px 0 32px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Simple content container */
.enhanced-modal-content {
    /* Remove complex flex constraints */
}

/* =============================================================================
   ENHANCED TAB SYSTEM
   ============================================================================= */

.bccs-enhanced-tabs-wrapper {
    /* Let WordPress handle the tab wrapper */
}

.bccs-enhanced-tabs {
    /* Simplified tabs - let WordPress handle layout */
}

.bccs-enhanced-tabs .components-tab-panel__tabs {
    display: flex !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin: 0 !important;
    padding: 0 32px !important;
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(10px) !important;
    flex-shrink: 0 !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item {
    background: none !important;
    border: none !important;
    padding: 16px 24px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item .dashicons {
    font-size: 16px !important;
    opacity: 0.8 !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item:hover {
    color: #2563eb !important;
    background: rgba(37, 99, 235, 0.08) !important;
    transform: translateY(-2px) !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item:hover .dashicons {
    opacity: 1 !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item.is-active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.bccs-enhanced-tabs .components-tab-panel__tabs-item.is-active .dashicons {
    opacity: 1 !important;
}

.bccs-enhanced-tabs .components-tab-panel__tab-content {
    /* Simple: just add background and let WordPress handle the rest */
    background: rgba(255, 255, 255, 0.3);
    padding: 0;
}

/* Simple scrolling approach - remove all complex constraints */
.tab-content-scrollable {
    padding: 32px;
    /* Simple approach: just set a specific height and let it scroll */
    height: 400px;
    overflow-y: scroll;
    overflow-x: hidden;
}

/* =============================================================================
   ENHANCED CONTENT SECTIONS
   ============================================================================= */

.content-section {
    margin-bottom: 32px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2563eb;
}

.section-title .dashicons {
    color: #2563eb;
    font-size: 20px;
}

/* =============================================================================
   SIMPLIFIED FORM FIELDS
   ============================================================================= */

.form-fields-simple {
    display: grid;
    gap: 12px;
}

.field-row-simple {
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    transition: all 0.2s ease;
}

.field-row-simple:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
}

.field-label-simple {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
    margin-bottom: 8px;
    position: relative;
}

.field-label-simple .dashicons {
    color: #2563eb;
    font-size: 16px;
}

.field-value-simple {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    padding: 8px 12px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 6px;
}

/* =============================================================================
   SIMPLIFIED DETAIL SECTIONS
   ============================================================================= */

.detail-sections-simple,
.technical-sections-simple {
    display: grid;
    gap: 20px;
}

.detail-section {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #2563eb;
}

.section-title-simple {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.section-title-simple .dashicons {
    color: #2563eb;
    font-size: 18px;
}

.detail-list {
    display: grid;
    gap: 12px;
}

.detail-row-simple {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.8);
}

.detail-row-simple:last-child {
    border-bottom: none;
}

.detail-row-simple .detail-label {
    font-weight: 600;
    color: #64748b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 120px;
}

.detail-row-simple .detail-value {
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.detail-row-simple .detail-value a {
    color: #2563eb;
    text-decoration: none;
}

.detail-row-simple .detail-value a:hover {
    text-decoration: underline;
}

/* =============================================================================
   ENHANCED FORM FIELDS (legacy)
   ============================================================================= */

.form-fields-enhanced {
    display: grid;
    gap: 16px;
}

.field-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.field-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.3);
}

.field-card .components-card__body {
    padding: 24px !important;
}

.field-row-enhanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-label-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
    word-break: break-word;
    position: relative;
}

.field-label-enhanced .dashicons {
    color: #2563eb;
    font-size: 16px;
}

.field-value-enhanced {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    padding: 12px 16px;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.copy-button {
    opacity: 0.6;
    transition: opacity 0.2s ease;
    color: #64748b !important;
    padding: 4px !important;
    min-height: auto !important;
    height: auto !important;
}

.copy-button:hover {
    opacity: 1;
    color: #2563eb !important;
}

.copied-indicator {
    position: absolute;
    top: -8px;
    right: 0;
    background: #10b981;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    animation: fadeInOut 2s ease;
}

.no-data-enhanced {
    text-align: center;
    padding: 64px 32px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    margin: 0;
}

.no-data-enhanced .dashicons {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: block;
}

.no-data-enhanced h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
}

.no-data-enhanced p {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
}

/* =============================================================================
   ENHANCED ENTRY DETAILS
   ============================================================================= */

.detail-sections,
.technical-sections {
    display: grid;
    gap: 24px;
}

.detail-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.detail-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.3);
}

.detail-card .components-card__body {
    padding: 24px !important;
}

.detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(248, 250, 252, 0.6);
    border-radius: 12px;
    border-left: 4px solid #2563eb;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: rgba(248, 250, 252, 0.9);
    transform: translateX(4px);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-value code {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
}

.detail-value.status-active {
    align-items: center;
    gap: 8px;
}

.detail-value.status-active .status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.detail-value.ip-address,
.detail-value.user-agent,
.detail-value.referrer-url {
    position: relative;
}

.detail-value .external-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.1);
    transition: all 0.2s ease;
    word-break: break-all;
}

.detail-value .external-link:hover {
    background: rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.detail-value .external-link .dashicons {
    font-size: 14px;
    color: #2563eb;
}

.detail-value .not-available {
    color: #94a3b8;
    font-style: italic;
    font-size: 13px;
}

.timestamp-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timestamp-display .relative-time {
    font-weight: 600;
    color: #1e1e1e;
}

.timestamp-display .full-time {
    font-size: 12px;
    color: #64748b;
}

/* =============================================================================
   ENHANCED SCROLLBAR STYLING
   ============================================================================= */

.bccs-enhanced-tabs .components-tab-panel__tab-content::-webkit-scrollbar {
    width: 8px;
}

.bccs-enhanced-tabs .components-tab-panel__tab-content::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
    border-radius: 4px;
}

.bccs-enhanced-tabs .components-tab-panel__tab-content::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.bccs-enhanced-tabs .components-tab-panel__tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.6);
}

.tab-content-scrollable::-webkit-scrollbar {
    width: 8px;
}

.tab-content-scrollable::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
    border-radius: 4px;
}

.tab-content-scrollable::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.tab-content-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.6);
}

/* Enhanced modal content scrollbar */
.enhanced-modal-content::-webkit-scrollbar {
    width: 8px;
}

.enhanced-modal-content::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
    border-radius: 4px;
}

.enhanced-modal-content::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.3);
    border-radius: 4px;
}

.enhanced-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.6);
}

/* =============================================================================
   ENHANCED ANIMATIONS
   ============================================================================= */

@keyframes modalEnhancedFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        backdrop-filter: blur(20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    20%, 80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

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

/* =============================================================================
   ENHANCED RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 1024px) {
    .bccs-enhanced-modal .components-modal__frame {
        width: 95vw;
        max-width: 900px;
    }

    .enhanced-modal-header {
        padding: 24px;
    }

    .entry-timestamps {
        flex-direction: column;
        gap: 12px;
    }

    .header-actions {
        gap: 8px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bccs-enhanced-modal .components-modal__frame {
        width: 95vw;
        max-height: 95vh;
        border-radius: 12px;
    }

    .enhanced-modal-header {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .entry-title {
        font-size: 20px;
    }

    .header-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .header-actions .components-button {
        width: 100%;
        justify-content: center;
    }

    .enhanced-modal-content {
        height: calc(95vh - 200px);
        max-height: calc(95vh - 200px);
    }

    .bccs-enhanced-tabs .components-tab-panel__tabs {
        padding: 0 20px;
        flex-wrap: wrap;
    }

    .bccs-enhanced-tabs .components-tab-panel__tabs-item {
        padding: 12px 16px;
        font-size: 13px;
        flex: 1;
        min-width: 120px;
    }

    .tab-content-scrollable {
        padding: 20px;
    }

    .section-title {
        font-size: 16px;
    }

    .detail-item {
        padding: 12px;
    }

    .field-card .components-card__body {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .bccs-enhanced-modal .components-modal__frame {
        width: 98vw;
        max-height: 98vh;
        border-radius: 8px;
    }

    .enhanced-modal-header {
        padding: 16px;
    }

    .entry-id-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .entry-title {
        font-size: 18px;
    }

    .enhanced-modal-content {
        height: calc(98vh - 180px);
        max-height: calc(98vh - 180px);
    }

    .bccs-enhanced-tabs .components-tab-panel__tabs {
        padding: 0 16px;
    }

    .bccs-enhanced-tabs .components-tab-panel__tabs-item {
        padding: 10px 12px;
        font-size: 12px;
        gap: 4px;
    }

    .bccs-enhanced-tabs .components-tab-panel__tabs-item .dashicons {
        display: none;
    }

    .tab-content-scrollable {
        padding: 16px;
    }

    .detail-card .components-card__body {
        padding: 12px !important;
    }

    .field-row-enhanced {
        gap: 8px;
    }

    .field-label-enhanced {
        font-size: 13px;
    }

    .field-value-enhanced {
        font-size: 13px;
        padding: 8px 12px;
    }

    .detail-value code {
        font-size: 11px;
        padding: 2px 4px;
    }
}

/* =============================================================================
   LEGACY MODAL STYLES (for backward compatibility)
   ============================================================================= */

/* Old modal system - kept for any legacy usage */
.bccs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.bccs-modal-content {
    background: #fff;
    border-radius: 4px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.2s ease;
}

.bccs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #c3c4c7;
    background: #f6f7f7;
}

.bccs-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.bccs-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bccs-modal-close:hover {
    color: #2c3338;
}

.bccs-modal-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

.bccs-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Legacy responsive */
@media (max-width: 768px) {
    .bccs-modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* =============================================================================
   IMPROVED EXPORT MODAL STYLES
   ============================================================================= */

/* Export Modal Header */
.export-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
}

.export-modal-header .dashicon {
    color: #2563eb;
    font-size: 20px;
}

.export-summary-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

.export-summary-badge .count {
    color: #2563eb;
    font-weight: 700;
}

.export-summary-badge .label {
    color: #64748b;
}

/* Tab Panel Improvements */
.export-tabs .components-tab-panel__tabs {
    border-bottom: 2px solid #f1f5f9;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 12px 12px 0 0;
    padding: 0 20px;
    margin: 0;
}

.export-tabs .components-tab-panel__tabs-item {
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    color: #64748b;
    font-weight: 500;
    padding: 16px 20px;
    margin: 0 4px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-tabs .components-tab-panel__tabs-item:hover {
    background: rgba(37, 99, 235, 0.05);
    color: #2563eb;
}

.export-tabs .components-tab-panel__tabs-item[aria-selected="true"] {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 600;
}

.export-tabs .components-tab-panel__tabs-item[aria-selected="true"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #2563eb;
    border-radius: 2px;
}

.export-tabs .components-tab-panel__tab-content {
    padding: 0;
    background: white;
}

/* Tab Content */
.export-tab-content {
    padding: 24px;
    min-height: 400px;
}

/* Quick Summary */
.export-quick-summary {
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.15);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.01) 100%);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.summary-item .dashicon {
    color: #2563eb;
    font-size: 18px;
}

.summary-item div {
    display: flex;
    flex-direction: column;
}

.summary-item strong {
    font-size: 18px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.2;
}

.summary-item span {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Format Selection */
.format-selection {
    margin-bottom: 24px;
}

.format-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Custom Format Selector */
.format-selector {
    grid-column: 1 / -1; /* Full width */
}

.format-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 12px;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.format-option:hover,
.format-option:focus {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.02);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
    outline: none;
}

.format-option:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 2px 8px rgba(37, 99, 235, 0.15);
}

.format-option.selected {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.format-option.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 12px;
    color: #2563eb;
    font-weight: bold;
    font-size: 16px;
}

.format-option svg {
    width: 24px;
    height: 24px;
    color: #64748b;
    flex-shrink: 0;
}

.format-option.selected svg {
    color: #2563eb;
}

.format-option span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.format-option.selected span {
    color: #2563eb;
    font-weight: 600;
}

.format-help {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    font-style: italic;
}

/* Advanced Options */
.advanced-csv-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.options-header .components-button {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    padding: 0;
}

.options-header .components-button:hover {
    color: #1e40af;
}

.advanced-options-content {
    margin-top: 16px;
    padding: 20px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Data Selection */
.field-categories {
    display: grid;
    gap: 24px;
}

.field-category h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-list .components-checkbox-control__label {
    font-weight: 500;
}

/* Filter Sections */
.filter-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-section {
    padding: 20px;
    background: rgba(248, 250, 252, 0.3);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.filter-highlight {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    padding: 16px;
}

.filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.date-range-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card-description {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

/* Final Summary */
.export-final-summary {
    margin-bottom: 24px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.final-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.summary-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.summary-stat strong {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1.2;
}

.summary-stat span {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Preview Styles */
.preview-entries {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-entry {
    padding: 16px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.preview-entry:hover {
    background: rgba(37, 99, 235, 0.02);
    border-color: rgba(37, 99, 235, 0.2);
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.entry-number {
    background: #2563eb;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
}

.entry-form {
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.entry-date {
    font-size: 12px;
    color: #64748b;
    background: rgba(100, 116, 139, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.entry-fields {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.field-count {
    font-size: 12px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.field-sample {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.field-preview {
    font-size: 11px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.field-preview strong {
    color: #374151;
}

.preview-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: rgba(100, 116, 139, 0.05);
    border-radius: 8px;
    color: #64748b;
    font-style: italic;
}

.preview-more .dashicon {
    color: #94a3b8;
}

/* Preview Placeholder */
.preview-placeholder {
    margin-bottom: 24px;
}

.preview-prompt {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.preview-prompt .dashicon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.preview-prompt h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 16px;
}

.preview-prompt p {
    margin: 0;
    font-size: 14px;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.actions-left {
    display: flex;
    gap: 8px;
}

.actions-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.export-button {
    background: #2563eb !important;
    border-color: #2563eb !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.export-button:hover {
    background: #1e40af !important;
    border-color: #1e40af !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Spinner styles removed as we use isBusy prop instead */

/* Responsive Design for Export Modal */
@media (max-width: 768px) {
    .export-tab-content {
        padding: 16px;
    }

    .format-options-grid {
        grid-template-columns: 1fr;
    }

    .options-row {
        grid-template-columns: 1fr;
    }

    .date-range-grid {
        grid-template-columns: 1fr;
    }

    .final-summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .actions-left,
    .actions-right {
        justify-content: center;
    }

    .actions-right {
        flex-direction: column-reverse;
        width: 100%;
    }

    .export-tabs .components-tab-panel__tabs {
        padding: 0 8px;
    }

    .export-tabs .components-tab-panel__tabs-item {
        padding: 12px 8px;
        font-size: 12px;
    }

    .export-modal-header {
        font-size: 16px;
    }

    .export-summary-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .format-options {
        grid-template-columns: 1fr;
    }

    .format-option {
        padding: 12px;
        font-size: 13px;
    }

    .format-option svg {
        width: 20px;
        height: 20px;
    }
}