/**
 * Translation Settings - Enterprise UI Style
 * Matches the exact design of Translation Manager
 */

/* Main wrapper */
.wallet-up-translation-wrapper {
    clear: both;
    padding: 20px !important;
    margin: 0 auto;
    position: relative;
    min-height: 100vh !important;
    max-width: 1400px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Prevent horizontal scroll on body */
body.wallet-up-translation-page {
    overflow-x: hidden !important;
}

/* Ensure all child elements respect boundaries */
.wallet-up-translation-wrapper * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Enterprise UI container */
.translation-enterprise-ui {
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.translation-header-advanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: visible;
    min-height: 80px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
}

.header-title .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #674FBF;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
}

/* Provider Selection */
.provider-selection {
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 24px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.provider-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #674FBF;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.provider-card:hover::before {
    transform: translateY(0);
}

.provider-card.active::before {
    transform: translateY(0);
}

.provider-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.provider-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.provider-description {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.requires-key {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.free-service {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.provider-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.15);
}

.provider-card:hover::before {
    transform: translateY(0);
}

.provider-card.active {
    background: linear-gradient(135deg, #f3f4ff 0%, #faf5ff 100%);
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1), 0 4px 12px rgba(102,126,234,0.1);
}

.provider-card.active::before {
    transform: translateY(0);
}

.provider-card.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #667eea;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.provider-header .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #667eea;
}

.provider-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.provider-description {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.requires-key {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.free-service {
    display: inline-block;
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ready-to-translate {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.ready-to-translate .dashicons {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Provider Settings */
.provider-settings {
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.provider-panel {
    animation: fadeIn 0.3s ease;
}

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

.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-row label {
    font-weight: 500;
    color: #374151;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group input {
    flex: 1;
}

.toggle-visibility {
    padding: 8px 12px !important;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.description a {
    color: #674FBF;
    text-decoration: none;
}

.description a:hover {
    text-decoration: underline;
}

/* Stats Cards (for local provider) */
.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f3f4ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103,79,191,0.15);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #674FBF;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Advanced Settings */
.advanced-settings {
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.advanced-settings .setting-row {
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.advanced-settings .setting-row:last-child {
    border-bottom: none;
}

.advanced-settings input[type="checkbox"] {
    margin-right: 8px;
}

.advanced-settings .small-text {
    width: 80px;
}

/* Test Translation */
.test-translation {
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 200px 150px;
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.test-input,
.test-language {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.test-result {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    margin-top: 20px;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
}

.result-item strong {
    display: block;
    margin-bottom: 8px;
    color: #374151;
}

.result-item p {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
}

.result-meta {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 13px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.2s ease;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top-color: #674FBF;
    border-right-color: #5a449f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    margin: 0;
    color: #374151;
    font-size: 14px;
}

/* ========================================
   REUSABLE BUTTON SYSTEM
   All buttons share the same base styling
   Colors are preserved per button type
   ======================================== */

/* Base button styling - applies to ALL buttons */
.button,
.button-primary,
.button-secondary,
.button-link-delete {
    /* Layout */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    
    /* Dimensions */
    padding: 12px 24px !important;
    min-height: 40px !important;
    
    /* Typography */
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    
    /* Appearance */
    border-radius: 8px !important;
    border-width: 2px !important;
    border-style: solid !important;
    
    /* Effects */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    
    /* Prevent text selection */
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Icon styling inside buttons */
.button .dashicons,
.button-primary .dashicons,
.button-secondary .dashicons,
.button-link-delete .dashicons {
    font-size: 18px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* Hover state for all buttons */
.button:hover,
.button-primary:hover,
.button-secondary:hover,
.button-link-delete:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

/* Active/pressed state for all buttons */
.button:active,
.button-primary:active,
.button-secondary:active,
.button-link-delete:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* Focus state for accessibility */
.button:focus,
.button-primary:focus,
.button-secondary:focus,
.button-link-delete:focus {
    outline: 2px solid rgba(103, 79, 191, 0.4) !important;
    outline-offset: 2px !important;
}

/* Disabled state */
.button:disabled,
.button-primary:disabled,
.button-secondary:disabled,
.button-link-delete:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ========================================
   BUTTON COLOR VARIANTS
   Each preserves its unique color scheme
   ======================================== */

/* Default button */
.button {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

.button:hover {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* Primary button */
.button-primary {
    background: linear-gradient(135deg, #674FBF 0%, #5a449f 100%) !important;
    border-color: #674FBF !important;
    color: white !important;
}

.button-primary:hover {
    background: linear-gradient(135deg, #5a449f 0%, #4d3a85 100%) !important;
    border-color: #5a449f !important;
    color: white !important;
}

/* Secondary button */
.button-secondary {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

.button-secondary:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* Delete/danger button */
.button-link-delete {
    background: #fff5f5 !important;
    border-color: #fecaca !important;
    color: #dc2626 !important;
}

.button-link-delete:hover {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #b91c1c !important;
}

/* ========================================
   BUTTON SIZE MODIFIERS
   ======================================== */

.button-large,
.button-primary.button-large,
.button-secondary.button-large {
    padding: 14px 32px !important;
    font-size: 16px !important;
    min-height: 48px !important;
}

.button-large .dashicons {
    font-size: 20px !important;
    width: 20px !important;
    height: 20px !important;
}

.button-small,
.button-primary.button-small,
.button-secondary.button-small {
    padding: 8px 16px !important;
    font-size: 13px !important;
    min-height: 32px !important;
}

.button-small .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
}

/* ========================================
   SPECIAL BUTTON STATES
   ======================================== */

/* Success state */
.button-primary.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #10b981 !important;
}

.button-primary.success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #059669 !important;
}

/* Loading state */
.button.loading,
.button-primary.loading,
.button-secondary.loading {
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.button.loading::after,
.button-primary.loading::after,
.button-secondary.loading::after {
    content: "" !important;
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    margin: auto !important;
    border: 2px solid transparent !important;
    border-radius: 50% !important;
    border-top-color: currentColor !important;
    animation: button-spin 0.6s linear infinite !important;
}

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

/* Notifications */
.notice {
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid;
    margin: 0;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notice-success {
    background-color: #f0fdf4;
    border-left-color: #10b981;
    color: #065f46;
}

.notice-error {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.notice-info {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.notice-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

/* Success animation for save button */
.button-primary.success {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

.button-primary.success .dashicons {
    animation: checkmark 0.5s ease;
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(-45deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .translation-header-advanced {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .provider-grid {
        grid-template-columns: 1fr;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
}
/* Enhanced Input Field Styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    color: #1e293b;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out;
    box-shadow: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    color: #1e293b;
    background-color: #fff;
    border-color: #674FBF;
    outline: 0;
    box-shadow: none;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="url"]:hover,
select:hover {
    border-color: #cbd5e1;
}

/* Checkbox and Toggle Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-right: 10px;
}

input[type="checkbox"]:checked {
    background: #1e293b;
    border-color: #1e293b;
}

input[type="checkbox"]:focus {
    outline: 0;
    border-color: #64748b;
}

/* Field Group Styling */
.field-group {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Section Divider */
.section-divider {
    border-top: 1px solid #e5e7eb;
    margin: 30px -30px;
    padding: 0 30px;
}

.section-divider + * {
    padding-top: 30px;
}

/* API Key Field Special Styling */
.api-key-field {
    font-family: "SF Mono", Monaco, Consolas, "Courier New", monospace;
    background: #f8fafc;
}

/* Help Text */
.help-text {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.help-text a {
    color: #674FBF;
    text-decoration: none;
    font-weight: 500;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* Inline Labels */
.inline-label {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inline-label input[type="checkbox"] {
    margin: 0;
}

.inline-label span {
    font-size: 14px;
    color: #374151;
}

/* Number Input with Unit */
.input-with-unit {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-with-unit input[type="number"] {
    max-width: 100px;
}

.input-with-unit .unit {
    font-size: 14px;
    color: #64748b;
    white-space: nowrap;
}

/* Global button icon fix for all interfaces */
.wallet-up-admin-interface .button .dashicons,
.wallet-up-admin-interface .button-primary .dashicons,
.wallet-up-admin-interface .button-secondary .dashicons,
.wallet-up-admin-interface .button-link-delete .dashicons,
#wallet-up-translation-app .button .dashicons,
#wallet-up-translation-settings .button .dashicons {
    display: inline-block \!important;
    width: 16px \!important;
    height: 16px \!important;
    font-size: 16px \!important;
    line-height: 16px \!important;
    vertical-align: middle \!important;
    margin-top: -2px \!important;
    margin-right: 6px \!important;
}

/* Fix for all button types */
.wallet-up-admin-interface button.button,
.wallet-up-admin-interface a.button,
.wallet-up-admin-interface input[type="submit"].button,
.wallet-up-admin-interface input[type="button"].button,
#wallet-up-translation-app button.button,
#wallet-up-translation-app a.button,
#wallet-up-translation-settings button.button,
#wallet-up-translation-settings a.button {
    display: inline-flex \!important;
    align-items: center \!important;
    justify-content: center \!important;
    text-decoration: none \!important;
}

/* Modern button hover effects */
.wallet-up-admin-interface .button:not(.button-primary):hover,
#wallet-up-translation-app .button:not(.button-primary):hover,
#wallet-up-translation-settings .button:not(.button-primary):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Better spacing for button groups */
.button-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Settings Footer */
.settings-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e4e8;
    background: linear-gradient(to bottom, transparent, #f8f9fa);
}

.settings-footer .footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
}

/* Translation Controls Wrapper */
.translation-controls-wrapper {
    margin-bottom: 25px;
    position: relative;
    z-index: 10;
    clear: both;
}

/* Translation Search and Filters Layout */
.translation-search-row {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.walletup-search-box.full-width {
    position: relative;
    width: 100%;
}

.walletup-search-box input {
    margin-bottom: 20px;
}

.walletup-search-box.full-width input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.walletup-search-box.full-width input:focus {
    outline: none;
    border-color: #674FBF;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(103, 79, 191, 0.1);
}

.walletup-search-box.full-width input::placeholder {
    color: #94a3b8;
}

/* Filters Row */
.translation-filters-row {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.translation-filters-row .filter-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
}

.translation-filters-row .filter-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    min-width: 0;
}

.translation-filters-row .filter-select:hover {
    border-color: #674FBF;
}

.translation-filters-row .filter-select:focus {
    outline: none;
    border-color: #674FBF;
    box-shadow: 0 0 0 3px rgba(103, 79, 191, 0.1);
}

.translation-filters-row .show-dismissed-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-self: center;
    white-space: nowrap;
}

.translation-filters-row .show-dismissed-label input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

.translation-filters-row .button-secondary {
    padding: 8px 16px;
    width: 100%;
    min-width: 0;
}

/* Translation List Container - Prevent Overlap */
.translation-list-container {
    position: relative;
    clear: both;
    margin-top: 20px !important;
}

/* Responsive adjustments */
/* Responsive breakpoints for translation filters - Granular breakdown */

/* Container to prevent horizontal scroll */
.wallet-up-translation-wrapper {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Header responsive adjustments */
@media (max-width: 1200px) {
    .translation-header-advanced {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .header-right {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-right .button {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .header-right .button {
        flex: 1 1 calc(50% - 5px);
        min-width: 90px;
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .header-right .button .dashicons {
        font-size: 14px !important;
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 480px) {
    .header-right {
        flex-direction: column;
    }
    
    .header-right .button {
        width: 100%;
        flex: 1 1 100%;
    }
}

/* Extra large screens */
@media (max-width: 1920px) {
    .translation-filters-row .filter-controls {
        gap: 15px;
        max-width: 100%;
    }
}

/* Large desktop */
@media (max-width: 1600px) {
    .translation-filters-row .filter-controls {
        gap: 12px;
    }
    
    .translation-filters-row .filter-select {
        min-width: 140px;
    }
}

/* Standard desktop */
@media (max-width: 1400px) {
    .translation-filters-row .filter-controls {
        flex-wrap: wrap;
        row-gap: 10px;
        column-gap: 10px;
        max-width: 100%;
    }
    
    .translation-filters-row .filter-select {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 120px;
    }
    
    .translation-filters-row .button-secondary {
        flex: 1 1 calc(33.333% - 10px);
        min-width: 120px;
    }
}

/* Small desktop / Large laptop */
@media (max-width: 1280px) {
    .translation-filters-row .filter-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        max-width: 100%;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        flex: 1 1 calc(50% - 5px);
        min-width: 140px;
    }
    
    .translation-filters-row .show-dismissed-label {
        min-width: 130px;
    }
}

/* Laptop */
@media (max-width: 1200px) {
    .translation-filters-row .filter-controls {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        max-width: 100%;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        flex: 1 1 calc(50% - 6px);
        min-width: 130px;
        font-size: 13px;
    }
    
    .translation-filters-row .show-dismissed-label {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* Large tablet / Small laptop */
@media (max-width: 1024px) {
    .translation-filters-row {
        padding: 18px;
    }
    
    .translation-filters-row .filter-controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary,
    .translation-filters-row .show-dismissed-label {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 9px 11px;
    }
}

/* Tablet portrait */
@media (max-width: 992px) {
    .translation-filters-row .filter-controls {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .translation-filters-row .show-dismissed-label {
        grid-column: span 2;
        justify-self: center;
        margin-top: 5px;
    }
    
    .translation-filters-row .button-secondary {
        grid-column: span 1;
    }
}

/* Large phone / Small tablet */
@media (max-width: 834px) {
    .translation-filters-row .filter-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Standard mobile */
@media (max-width: 768px) {
    .translation-search-row,
    .translation-filters-row {
        padding: 15px;
    }
    
    .translation-filters-row .filter-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        width: 100%;
        max-width: none;
        padding: 11px 14px;
        font-size: 14px;
    }
    
    .translation-filters-row .show-dismissed-label {
        margin: 10px 0;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 6px;
        justify-content: flex-start;
    }
}

/* Phablet */
@media (max-width: 600px) {
    .translation-filters-row {
        padding: 12px;
    }
    
    .translation-filters-row .filter-controls {
        gap: 8px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        min-height: 44px; /* iOS touch target */
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .translation-search-row,
    .translation-filters-row {
        padding: 10px;
        border-radius: 6px;
    }
    
    .walletup-search-box.full-width input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 42px;
    }
}

/* iPhone 12 Mini, 13 Mini */
@media (max-width: 428px) {
    .translation-filters-row .filter-controls {
        gap: 7px;
    }
    
    .translation-filters-row .filter-select {
        font-size: 13px;
    }
}

/* Older iPhones (SE, 8, etc) */
@media (max-width: 375px) {
    .translation-filters-row {
        padding: 8px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        font-size: 13px;
        padding: 9px 10px;
        min-height: 40px;
    }
}

/* Very small phones */
@media (max-width: 320px) {
    .translation-search-row,
    .translation-filters-row {
        padding: 6px;
    }
    
    .translation-filters-row .filter-select,
    .translation-filters-row .button-secondary {
        font-size: 12px;
        padding: 8px;
        min-height: 38px;
    }
    
    .walletup-search-box.full-width input {
        font-size: 14px;
        padding: 8px 10px;
    }
}

/* ========================================
   FILTER CONTROLS - GRANULAR RESPONSIVE BREAKPOINTS
   ======================================== */

/* Base filter controls - prevent horizontal scroll */
.filter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.filter-controls select,
.filter-controls .filter-select {
    flex: 0 1 auto;
    min-width: 130px;
    max-width: 200px;
}

.filter-controls .button,
.filter-controls .button-secondary {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

/* When bulk action buttons are visible */
.filter-controls .button-secondary[style*="display: block"],
.filter-controls .button-secondary[style*="display: inline"],
.filter-controls .button-secondary:not([style*="display: none"]) {
    grid-column: span 1;
    width: 100%;
    min-width: 0;
}

/* Bulk action buttons - ensure they don't break layout */
#bulk-translate,
#reset-translations,
#dismiss-selected {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide button text on very small screens, show only icon */
@media (max-width: 600px) {
    #bulk-translate span:not(.dashicons),
    #reset-translations span:not(.dashicons),
    #dismiss-selected span:not(.dashicons) {
        display: none;
    }
    
    #bulk-translate .dashicons,
    #reset-translations .dashicons,
    #dismiss-selected .dashicons {
        margin-right: 0 !important;
    }
}

.filter-controls .show-dismissed-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Extra large screens (4K, ultra-wide) */
@media (max-width: 1920px) {
    .filter-controls {
        gap: 15px;
        padding: 0;
        max-width: 100%;
    }
}

/* Large desktop (1600px) */
@media (max-width: 1600px) {
    .filter-controls {
        gap: 12px;
    }
    
    .filter-controls select,
    .filter-controls .filter-select {
        min-width: 140px;
    }
}

/* Standard desktop (1400px) */
@media (max-width: 1400px) {
    .filter-controls {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 10px;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select {
        grid-column: span 1;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .filter-controls .show-dismissed-label {
        grid-column: span 1;
        justify-self: start;
    }
    
    .filter-controls .button,
    .filter-controls .button-secondary {
        grid-column: span 1;
        width: 100%;
        min-width: 0;
    }
}

/* Small desktop / Large laptop (1280px) */
@media (max-width: 1280px) {
    .filter-controls {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary,
    .filter-controls .show-dismissed-label {
        grid-column: span 1;
        width: 100%;
        min-width: 0;
        max-width: none;
    }
}

/* Laptop (1200px) */
@media (max-width: 1200px) {
    .filter-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select {
        grid-column: span 1;
        width: 100%;
        font-size: 13px;
    }
    
    .filter-controls .show-dismissed-label {
        grid-column: span 1;
        width: 100%;
        justify-self: center;
    }
    
    .filter-controls .button,
    .filter-controls .button-secondary {
        grid-column: span 1;
        width: 100%;
        font-size: 13px;
    }
    
    /* When bulk buttons are visible, make them span full row */
    .filter-controls .button-secondary:not([style*="display: none"]) {
        grid-column: span 3;
    }
}

/* Large tablet / Small laptop (1024px) */
@media (max-width: 1024px) {
    .filter-controls {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select {
        grid-column: span 1;
        width: 100%;
        padding: 9px 11px;
    }
    
    .filter-controls .show-dismissed-label {
        grid-column: span 2;
        justify-self: center;
    }
    
    .filter-controls .button,
    .filter-controls .button-secondary {
        grid-column: span 2;
        width: 100%;
        max-width: none;
        padding: 9px 11px;
    }
}

/* Tablet portrait (992px) */
@media (max-width: 992px) {
    .filter-controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary,
    .filter-controls label.show-dismissed-label {
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .filter-controls label.show-dismissed-label {
        margin-top: 5px;
        text-align: center;
    }
}

/* Large phone / Small tablet (834px - iPad Mini) */
@media (max-width: 834px) {
    .filter-controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-width: 100%;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Standard mobile (768px) */
@media (max-width: 768px) {
    .filter-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        width: 100%;
        max-width: none;
        padding: 11px 14px;
        font-size: 14px;
    }
    
    .filter-controls label.show-dismissed-label {
        margin: 10px 0;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 6px;
        justify-content: flex-start;
    }
}

/* Phablet (600px) */
@media (max-width: 600px) {
    .filter-controls {
        gap: 8px;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        min-height: 44px; /* iOS touch target */
    }
}

/* Small mobile (480px) */
@media (max-width: 480px) {
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        font-size: 14px;
        padding: 10px 12px;
        min-height: 42px;
    }
    
    .filter-controls input[type="text"],
    .filter-controls input[type="search"] {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px 12px;
    }
}

/* iPhone 12 Mini, 13 Mini (428px) */
@media (max-width: 428px) {
    .filter-controls {
        gap: 7px;
    }
    
    .filter-controls select,
    .filter-controls .filter-select {
        font-size: 13px;
    }
}

/* Older iPhones - SE, 8, etc (375px) */
@media (max-width: 375px) {
    .filter-controls {
        padding: 0;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        font-size: 13px;
        padding: 9px 10px;
        min-height: 40px;
    }
}

/* Very small phones (320px) */
@media (max-width: 320px) {
    .filter-controls {
        gap: 6px;
    }
    
    .filter-controls select,
    .filter-controls .filter-select,
    .filter-controls .button,
    .filter-controls .button-secondary {
        font-size: 12px;
        padding: 8px;
        min-height: 38px;
    }
    
    .filter-controls input[type="text"],
    .filter-controls input[type="search"] {
        font-size: 14px;
        padding: 8px 10px;
    }
}
