/* Admin Product Comparisons Styles */

.shopglut-comparisons-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
}

.shopglut-comparisons-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.shopglut-comparisons-header .description {
    margin: 5px 0 0 0;
    color: #666;
}

.shopglut-comparisons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shopglut-comparison-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.shopglut-comparison-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.comparison-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.comparison-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.comparison-actions {
    display: flex;
    gap: 5px;
    margin-top: 15px;
}

.comparison-preview {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
}

.comparison-info p {
    margin: 5px 0;
    font-size: 13px;
}

.comparison-meta {
    font-size: 13px;
    line-height: 1.4;
}

.comparison-meta > div {
    margin-bottom: 10px;
}

.comparison-shortcode {
    background: #f1f1f1;
    padding: 8px;
    border-radius: 4px;
}

.comparison-shortcode code {
    background: transparent;
    padding: 0;
    font-size: 11px;
    word-break: break-all;
}

.comparison-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.comparison-status-active {
    background: #d4edda;
    color: #155724;
}

.comparison-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.shopglut-no-comparisons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-comparisons-content .dashicons {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-comparisons-content h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.no-comparisons-content p {
    margin: 0 0 20px 0;
    color: #666;
}

/* Toggle Switch */
.comparison-status-toggle {
    display: flex;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007cba;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Modal Styles */
.shopglut-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shopglut-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

.shopglut-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.shopglut-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.shopglut-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.shopglut-modal-close:hover {
    color: #333;
}

.shopglut-modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.shopglut-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ddd;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: none;
}

.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.form-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

/* Comparison Editor */
.shopglut-comparison-editor {
    background: #fff;
    border-radius: 8px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.editor-header h1 {
    margin: 0;
    font-size: 24px;
}

.editor-actions {
    display: flex;
    gap: 10px;
}

.editor-content {
    padding: 0;
}

.editor-main {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.editor-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.editor-preview {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
}

.preview-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
}

/* Field Selection */
.field-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.field-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Style Preview */
.style-preview {
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.style-preview table {
    width: 100%;
    border-collapse: collapse;
}

.style-preview th,
.style-preview td {
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 1200px) {
    .editor-main {
        grid-template-columns: 1fr;
    }
    
    .shopglut-comparisons-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .shopglut-comparisons-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .shopglut-comparisons-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row-group {
        grid-template-columns: 1fr;
    }
    
    .shopglut-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .shopglut-modal-body {
        padding: 20px;
    }
    
    .field-selection {
        grid-template-columns: 1fr;
    }
}