/* Magic Copy Editor Styles */
.magic-copy-hidden {
    display: none;
}

#magic-copy-import-dialog {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
    max-width: 500px;
    width: 90%;
}

.magic-copy-import-panel {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
}

.magic-copy-import-title {
    margin-top: 0;
}

#magic-copy-import-dialog h3 {
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding: 0;
}

#magic-copy-import-dialog p {
    color: #757575;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 20px 0;
}

.magic-copy-import-preview {
    background: #f8f9fa;
    border: 1px solid #e6e9ec;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
}

.magic-copy-import-preview strong {
    color: #1f1f1f;
    display: inline-block;
    min-width: 60px;
}

.magic-copy-import-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.magic-copy-import-actions .elementor-button {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.magic-copy-import-actions .elementor-button-success {
    background: #39b54a;
    color: white;
    border: none;
}

.magic-copy-import-actions .elementor-button-success:hover {
    background: #34aa44;
}

.magic-copy-import-actions .elementor-button-success:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Import overlay styles */
#magic-copy-import-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

/* Loading state */
.magic-copy-loading {
    position: relative;
    pointer-events: none;
}

.magic-copy-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #39b54a;
    border-radius: 50%;
    animation: magic-copy-spin 1s linear infinite;
}

@keyframes magic-copy-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error states */
.magic-copy-success {
    border-color: #39b54a !important;
    background: #f0f9f0 !important;
}

.magic-copy-error {
    border-color: #d72b3f !important;
    background: #fdf0f0 !important;
}

/* Textarea styles for import dialog */
.magic-copy-import-textarea {
    width: 100%;
    height: 200px;
    margin: 15px 0;
    padding: 12px;
    border: 1px solid #d5dadf;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
    background: #f8f9fa;
    transition: border-color 0.3s ease;
}

.magic-copy-import-textarea:focus {
    outline: none;
    border-color: #007cba;
    background: white;
    box-shadow: 0 0 0 1px #007cba;
}

/* Compact version for quick paste */
.magic-copy-quick-import {
    max-width: 400px !important;
}

.magic-copy-quick-import .magic-copy-import-preview {
    padding: 12px;
    margin-bottom: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    #magic-copy-import-dialog {
        width: 95%;
        margin: 20px;
    }
    
    .magic-copy-import-actions {
        flex-direction: column;
    }
    
    .magic-copy-import-actions .elementor-button {
        width: 100%;
    }
}

/* Integration with Elementor's dark mode */
.elementor-panel-dark-mode #magic-copy-import-dialog {
    background: #2d2d2d;
    color: #e0e1e3;
    border-color: #4c4c4c;
}

.elementor-panel-dark-mode #magic-copy-import-dialog h3 {
    color: #e0e1e3;
}

.elementor-panel-dark-mode #magic-copy-import-dialog p {
    color: #b4b5b7;
}

.elementor-panel-dark-mode .magic-copy-import-preview {
    background: #3a3a3a;
    border-color: #4c4c4c;
    color: #e0e1e3;
}

.elementor-panel-dark-mode .magic-copy-import-preview strong {
    color: #e0e1e3;
}

.elementor-panel-dark-mode .magic-copy-import-textarea {
    background: #3a3a3a;
    border-color: #4c4c4c;
    color: #e0e1e3;
}

.elementor-panel-dark-mode .magic-copy-import-textarea:focus {
    border-color: #007cba;
    background: #2d2d2d;
}