/* Image2Excel Pro Styles */

:root {
    --i2e-header-bg: #E0E0E0;
    --i2e-primary: #B0FF9D;
    --i2e-primary-hover: #9AE682;
    --i2e-text: #333333;
    --i2e-bg: #FFFFFF;
    --i2e-border: #DDDDDD;
    --i2e-shadow: rgba(0, 0, 0, 0.1);
    --i2e-radius: 8px;
}

/* Container */
.i2e-pro-container {
    background: var(--i2e-bg);
    border-radius: var(--i2e-radius);
    box-shadow: 0 4px 6px var(--i2e-shadow);
    margin: 20px 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--i2e-text);
}

.i2e-pro-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    margin: 0;
    border-radius: 0;
}

/* Header */
.i2e-pro-header {
    background: var(--i2e-header-bg);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--i2e-border);
}

.i2e-pro-logo {
    display: flex;
    align-items: center;
}

.i2e-pro-header-controls {
    display: flex;
    gap: 10px;
}

.i2e-pro-header-controls button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    color: var(--i2e-text);
}

.i2e-pro-header-controls button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.i2e-pro-header-controls .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Control Panel */
.i2e-pro-control-panel {
    background: var(--i2e-header-bg);
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid var(--i2e-border);
}

.i2e-pro-control-panel select,
.i2e-pro-control-panel input[type="range"] {
    padding: 6px 10px;
    border: 1px solid var(--i2e-border);
    border-radius: 4px;
    background: white;
}

.i2e-pro-sensitivity {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Upload Area */
.i2e-pro-upload-area {
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    transition: all 0.3s;
}

.i2e-pro-upload-area.dragover {
    background: linear-gradient(135deg, #e0eafc 0%, #cfdef3 100%);
    transform: scale(1.02);
}

.i2e-pro-dropzone {
    border: 2px dashed var(--i2e-border);
    border-radius: var(--i2e-radius);
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.i2e-pro-dropzone:hover {
    border-color: var(--i2e-primary);
}

.i2e-pro-dropzone .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--i2e-primary);
}

.i2e-pro-dropzone p {
    margin: 10px 0;
    font-size: 16px;
}

.i2e-pro-supported-formats {
    font-size: 12px;
    color: #666;
}

/* Preview Section */
.i2e-pro-preview-container {
    padding: 20px;
}

.i2e-pro-preview-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.i2e-pro-preview-toolbar button {
    padding: 5px 10px;
    border: 1px solid var(--i2e-border);
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.i2e-pro-preview-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.i2e-pro-original-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--i2e-border);
    border-radius: 4px;
}

.i2e-pro-data-preview {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--i2e-border);
    border-radius: 4px;
    padding: 10px;
}

/* Results Area */
.i2e-pro-results {
    padding: 20px;
}

.i2e-pro-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    align-items: center;
}

.i2e-pro-button-primary {
    background: var(--i2e-primary) !important;
    color: var(--i2e-text) !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: background 0.3s !important;
}

.i2e-pro-button-primary:hover {
    background: var(--i2e-primary-hover) !important;
}

.i2e-pro-export-btn,
.i2e-pro-save-btn {
    background: white;
    border: 1px solid var(--i2e-border);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.i2e-pro-undo-btn,
.i2e-pro-redo-btn {
    background: white;
    border: 1px solid var(--i2e-border);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.i2e-pro-undo-btn:disabled,
.i2e-pro-redo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.i2e-pro-search {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--i2e-border);
    border-radius: 4px;
    min-width: 200px;
}

/* Data Table */
.i2e-pro-data-table {
    overflow-x: auto;
    border: 1px solid var(--i2e-border);
    border-radius: 4px;
}

.i2e-pro-data-table table {
    width: 100%;
    border-collapse: collapse;
}

.i2e-pro-data-table th,
.i2e-pro-data-table td {
    border: 1px solid var(--i2e-border);
    padding: 8px;
    text-align: left;
}

.i2e-pro-data-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.i2e-pro-data-table td[contenteditable="true"]:hover {
    background: #fff9c4;
}

/* Loading */
.i2e-pro-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.i2e-pro-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--i2e-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* History Page */
.i2e-pro-history {
    padding: 20px;
    background: white;
    border-radius: var(--i2e-radius);
    box-shadow: 0 2px 4px var(--i2e-shadow);
}

.i2e-pro-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.i2e-pro-history-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.i2e-pro-history-table td {
    padding: 12px;
    border-bottom: 1px solid var(--i2e-border);
}

.i2e-pro-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.i2e-pro-status.completed {
    background: #d4edda;
    color: #155724;
}

.i2e-pro-status.pending {
    background: #fff3cd;
    color: #856404;
}

.i2e-pro-status.error {
    background: #f8d7da;
    color: #721c24;
}

.i2e-pro-view-btn,
.i2e-pro-download-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
    text-decoration: none;
    display: inline-block;
}

.i2e-pro-view-btn {
    background: var(--i2e-primary);
    color: var(--i2e-text);
}

.i2e-pro-download-btn {
    background: #17a2b8;
    color: white;
}

/* Floating Button */
.i2e-pro-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--i2e-primary);
    color: var(--i2e-text);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    font-weight: 600;
    transition: transform 0.3s;
}

.i2e-pro-floating-btn:hover {
    transform: scale(1.05);
}

.i2e-pro-floating-btn.i2e-pro-position-left {
    right: auto;
    left: 20px;
}

.i2e-pro-floating-btn.i2e-pro-position-center {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

.i2e-pro-floating-btn.i2e-pro-position-center:hover {
    transform: translateX(-50%) scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .i2e-pro-preview-split {
        grid-template-columns: 1fr;
    }
    
    .i2e-pro-control-panel {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .i2e-pro-control-panel select,
    .i2e-pro-control-panel .i2e-pro-sensitivity {
        width: 100%;
    }
    
    .i2e-pro-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .i2e-pro-results-toolbar {
        flex-wrap: wrap;
    }
    
    .i2e-pro-search {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .i2e-pro-header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .i2e-pro-dropzone {
        padding: 20px;
    }
    
    .i2e-pro-dropzone .dashicons {
        font-size: 36px;
        width: 36px;
        height: 36px;
    }
}