/* LM Export Pro - Frontend Styles */

.lm-export-pro-wrapper {
    padding: 20px 0;
}

.lm-export-pro-notice {
    padding: 15px 20px;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    color: #1d2327;
}

.lm-export-pro-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.lm-export-item {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.lm-export-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lm-export-item-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.lm-export-item-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1d2327;
}

.lm-export-schedule-badge {
    display: inline-block;
    font-size: 12px;
    color: #646970;
    background: #f6f7f7;
    padding: 4px 10px;
    border-radius: 12px;
}

.lm-export-item-meta {
    margin-bottom: 15px;
    font-size: 14px;
    color: #646970;
}

.lm-export-last-run {
    display: block;
    margin-bottom: 5px;
}

.lm-export-item-actions {
    display: flex;
    gap: 10px;
}

.lm-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    background: #fff;
    color: #1d2327;
}

.lm-export-btn:hover {
    background: #f6f7f7;
    border-color: #a7aaad;
}

.lm-export-btn-primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.lm-export-btn-primary:hover {
    background: #135e96;
    color: #fff;
    border-color: #135e96;
}

.lm-export-btn-danger {
    background: #fff;
    color: #d63638;
    border-color: #d63638;
}

.lm-export-btn-danger:hover {
    background: #d63638;
    color: #fff;
}

.lm-export-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lm-export-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.lm-export-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.lm-export-message.success {
    background: #d1e7dd;
    color: #0a3622;
    border: 1px solid #a3cfbb;
}

.lm-export-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.lm-export-progress {
    margin-top: 15px;
    height: 4px;
    background: #f0f0f1;
    border-radius: 2px;
    overflow: hidden;
}

.lm-export-progress-bar {
    height: 100%;
    background: #2271b1;
    width: 0;
    animation: lm-export-progress 1.5s ease-in-out infinite;
}

@keyframes lm-export-progress {
    0% {
        width: 0;
        margin-left: 0;
    }
    50% {
        width: 50%;
        margin-left: 25%;
    }
    100% {
        width: 0;
        margin-left: 100%;
    }
}

/* ========================================
   Frontend Admin Panel Styles
   ======================================== */

.lm-export-pro-frontend-admin {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 30px;
    margin: 20px 0;
}

/* Header */
.lm-export-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f1;
}

.lm-export-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1d2327;
}

/* Tabs */
.lm-export-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #dcdcde;
}

.lm-export-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: #646970;
    cursor: pointer;
    transition: all 0.2s;
}

.lm-export-tab:hover {
    color: #1d2327;
    background: #f6f7f7;
}

.lm-export-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.lm-export-tab .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Tab Content */
.lm-export-tab-content {
    display: none;
}

.lm-export-tab-content.active {
    display: block;
}

/* Empty State */
.lm-export-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.lm-export-empty-icon {
    font-size: 64px;
    color: #c3c4c7;
    margin-bottom: 20px;
}

.lm-export-empty-icon .dashicons {
    width: 64px;
    height: 64px;
    font-size: 64px;
}

.lm-export-empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #1d2327;
}

.lm-export-empty-state p {
    margin: 0 0 30px 0;
    color: #646970;
}

/* Template Cards */
.lm-export-templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.lm-export-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.lm-export-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lm-export-card-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lm-export-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
}

.lm-export-card-badges {
    display: flex;
    gap: 8px;
}

.lm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.lm-badge-success {
    background: #d1e7dd;
    color: #0a3622;
}

.lm-badge-inactive {
    background: #f0f0f1;
    color: #646970;
}

.lm-badge-info {
    background: #d0e7f5;
    color: #135e96;
}

.lm-export-card-body {
    padding: 20px;
}

.lm-export-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lm-export-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #646970;
}

.lm-export-meta-item .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #2271b1;
}

.lm-export-card-footer {
    padding: 15px 20px;
    background: #f6f7f7;
    display: flex;
    gap: 8px;
}

.lm-export-card-footer .lm-export-btn {
    flex: 0 0 auto;
    padding: 8px 16px;
    font-size: 13px;
}

/* Modal */
.lm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
}

.lm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.lm-modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.lm-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #dcdcde;
}

.lm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1d2327;
}

.lm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #646970;
    cursor: pointer;
    padding: 0;
}

.lm-modal-close:hover {
    color: #1d2327;
}

.lm-modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.lm-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #dcdcde;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f6f7f7;
}

/* Form Styles */
.lm-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f1;
}

.lm-form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.lm-form-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1d2327;
}

.lm-form-section .description {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #646970;
}

.lm-form-group {
    margin-bottom: 20px;
}

.lm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
}

.lm-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.lm-form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.required {
    color: #d63638;
}

/* Field Rows */
.lm-field-row, .lm-filter-row {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
}

.lm-field-row-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
}

.lm-field-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.lm-field-row-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Combined fields */
.lm-combined-field {
    background: #f0f6fc;
    border-left: 3px solid #2271b1;
}

.lm-combined-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: #2271b1;
    margin-bottom: 10px;
}

.lm-combined-sources {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.lm-combined-source {
    display: flex;
    gap: 8px;
    align-items: center;
}

.lm-combined-source select {
    flex: 1;
}

/* Transformations */
.lm-transformations-container {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.lm-transformations-container h5 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #646970;
    text-transform: uppercase;
}

.lm-transformations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.lm-transformation-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.lm-transformation-item select {
    flex: 0 0 200px;
}

.lm-transformation-params {
    flex: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lm-transformation-params input {
    flex: 1;
    min-width: 150px;
}

.lm-export-btn-small {
    font-size: 13px;
    padding: 6px 12px;
}

.lm-button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lm-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lm-btn-icon {
    padding: 8px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.lm-btn-icon:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
}

.lm-btn-icon.lm-remove-field:hover,
.lm-btn-icon.lm-remove-filter:hover,
.lm-btn-icon.lm-remove-transformation:hover,
.lm-btn-icon.lm-remove-combined-source:hover {
    background: #d63638;
    border-color: #d63638;
    color: #fff;
}

.lm-btn-icon.lm-toggle-transformations.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.lm-btn-icon .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .lm-export-pro-list,
    .lm-export-templates-list {
        grid-template-columns: 1fr;
    }
    
    .lm-export-item-actions,
    .lm-export-card-footer {
        flex-direction: column;
    }
    
    .lm-export-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .lm-filter-row {
        flex-wrap: wrap;
    }
    
    .lm-modal-dialog {
        width: 95%;
    }
    
    .lm-modal-body {
        padding: 20px;
    }
}

/* Logs Table */
.lm-export-logs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
}

.lm-export-logs-table thead {
    background: #f6f7f7;
}

.lm-export-logs-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #1d2327;
    border-bottom: 1px solid #dcdcde;
}

.lm-export-logs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
    color: #646970;
}

.lm-export-logs-table tbody tr:hover {
    background: #f6f7f7;
}

.lm-export-logs-table tbody tr:last-child td {
    border-bottom: none;
}

/* File Info Section */
.lm-export-file-info {
    padding: 15px 20px;
    background: #f0f6fc;
    border-top: 1px solid #dcdcde;
}

.lm-export-file-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.lm-export-file-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #646970;
}

.lm-export-file-stat .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    color: #2271b1;
}

.lm-export-file-links {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.lm-export-file-link {
    text-decoration: none;
}

.lm-export-file-url {
    margin-top: 8px;
}

.lm-file-url-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    background: #fff;
    color: #2271b1;
    cursor: text;
}

.lm-file-url-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}


