/**
 * Frontend Find & Replace Tool Styles for Multilang Find & Replace
 */

/* Frontend Find & Replace Panel */
.mfr-frontend-inspector-panel {
    position: fixed;
    top: 180px;
    right: 20px;
    width: 380px;
    max-height: 650px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: none;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.mfr-frontend-inspector-header {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
    padding: 18px 22px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.mfr-frontend-inspector-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

.mfr-frontend-inspector-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mfr-frontend-inspector-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mfr-frontend-inspector-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.mfr-frontend-inspector-content {
    padding: 22px;
    max-height: 550px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fafbfc 0%, #f5f7fa 100%);
}

.mfr-frontend-inspector-section {
    margin-bottom: 22px;
    background: white;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #e8eaed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mfr-frontend-inspector-section:last-child {
    margin-bottom: 0;
}

.mfr-frontend-inspector-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mfr-frontend-inspector-section textarea {
    width: 100%;
    border: 2px solid #e8eaed;
    border-radius: 6px;
    padding: 12px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 13px;
    resize: vertical;
    min-height: 70px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.mfr-frontend-inspector-section textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
    background: white;
}



/* Frontend Find & Replace Instructions */
.mfr-frontend-instructions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 16px;
}

.mfr-frontend-instructions p {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #495057;
}

.mfr-frontend-instructions p:last-child {
    margin-bottom: 0;
}

.mfr-frontend-inspector-actions {
    display: flex;
    flex-direction: column;
}

.mfr-button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

.mfr-button-primary {
    background-color: #0073aa;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.mfr-button-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
}

/* Frontend Find & Replace Mode Active Styles */
.mfr-frontend-inspector-active * {
    cursor: crosshair !important;
}

.mfr-frontend-inspector-active *:hover {
    outline: 2px solid #0073aa !important;
    outline-offset: 2px !important;
    transition: outline 0.2s ease;
}

.mfr-frontend-inspector-active .mfr-frontend-inspector-toggle,
.mfr-frontend-inspector-active .mfr-frontend-inspector-panel {
    cursor: pointer !important;
}

/* Frontend Find & Replace Notifications */
.mfr-frontend-notification {
    animation: slideInRight 0.4s ease-out;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-weight: 500;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mfr-frontend-inspector-panel {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        top: 150px;
    }
    
    .mfr-frontend-inspector-toggle {
        right: 10px !important;
        top: 100px !important;
        font-size: 12px !important;
        padding: 10px 14px !important;
    }
    
    .mfr-frontend-inspector-toggle .mfr-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .mfr-frontend-inspector-panel {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
    }
    
    .mfr-frontend-inspector-content {
        padding: 16px;
    }
    
    .mfr-frontend-inspector-section {
        padding: 14px;
        margin-bottom: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mfr-frontend-inspector-panel {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .mfr-frontend-inspector-content {
        background: linear-gradient(180deg, #1a1a1a 0%, #0f0f0f 100%);
    }
    
    .mfr-frontend-inspector-section {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .mfr-frontend-inspector-section label {
        color: #e0e0e0;
    }
    
    .mfr-frontend-inspector-section textarea {
        background: #1f1f1f;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .mfr-frontend-inspector-section textarea:focus {
        background: #2a2a2a;
    }
    
    .mfr-frontend-instructions {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-color: #555;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .mfr-frontend-inspector-panel {
        border-width: 3px;
    }
    
    .mfr-frontend-inspector-section {
        border-width: 2px;
    }
    
    .mfr-frontend-inspector-section textarea {
        border-width: 2px;
    }
    
    .mfr-button {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .mfr-frontend-inspector-toggle,
    .mfr-frontend-inspector-close,
    .mfr-frontend-inspector-section,
    .mfr-button {
        transition: none;
    }
    
    .mfr-frontend-notification {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .mfr-frontend-inspector-toggle,
    .mfr-frontend-inspector-panel {
        display: none !important;
    }
}
