/**
 * Vortem Admin Styles
 */

/* Admin Menu Icon Styles */
#adminmenu .toplevel_page_vortem-owerview .wp-menu-image {
    position: relative;
}

#adminmenu .toplevel_page_vortem-owerview .wp-menu-image img {
    position: relative;
    width: 24px;
    height: 24px;
}

#adminmenu .toplevel_page_vortem-owerview .wp-menu-image svg {
    position: relative;
    width: 24px;
    height: 24px;
}
.vortem-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.vortem-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}

.vortem-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Toast Notification Styles */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vortem-toast {
    animation: slideInDown 0.5s ease-out, fadeIn 0.5s ease-out;
    position: relative;
    z-index: 9999;
}

.vortem-toast-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.vortem-toast-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.vortem-toast h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}


.vortem-toast .plan-badge {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vortem-toast .features-list {
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
    font-size: 13px;
}

.vortem-toast .expiry-info {
    color: #666;
    font-size: 11px;
}

/* Centralized Notice Styles */
.vortem-notice {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin: 25px 0 !important;
    border-left: 4px solid !important;
}

/* Position notice-info elements at top of vortem-page-content with full width */
.vortem-page-content .notice.notice-info {
    position: relative !important;
    width: 100% !important;
    margin: 0 0 25px 0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    border-left: 4px solid #17a2b8 !important;
    color: #0c5460 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Also target all notice-info elements on Vortem pages */
.wrap .notice.notice-info {
    position: relative !important;
    width: 100% !important;
    margin: 0 0 25px 0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    border-left: 4px solid #17a2b8 !important;
    color: #0c5460 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.vortem-notice p {
    margin: 0 !important;
}

.vortem-notice .button {
    margin-top: 10px !important;
}

.vortem-notice.notice-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    border-left-color: #28a745 !important;
    color: #155724 !important;
}

.vortem-notice.notice-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    border-left-color: #ffc107 !important;
    color: #856404 !important;
}

.vortem-notice.notice-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%) !important;
    border-left-color: #dc3545 !important;
    color: #721c24 !important;
}

.vortem-notice.notice-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    border-left-color: #17a2b8 !important;
    color: #0c5460 !important;
}

.vortem-toast .expiry-info {
    color: #666;
    font-size: 11px;
    font-style: italic;
    margin-top: 8px;
}

.vortem-dashboard {
    margin-top: 20px;
}

.vortem-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    flex: 1;
    text-align: center;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

.vortem-actions {
    background: #ccebe5;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

.vortem-actions h2 {
    margin-top: 0;
}

.vortem-products,
.vortem-analytics {
    margin-top: 20px;
}

.orders-stats,
.orders-actions {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.orders-stats h2,
.orders-actions h2 {
    margin-top: 0;
}

.vortem-loading {
    display: none;
    color: #0073aa;
    font-style: italic;
}

.vortem-success {
    color: #46b450;
    font-weight: bold;
}

.vortem-error {
    color: #dc3232;
    font-weight: bold;
}

.vortem-progress {
    width: 100%;
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.vortem-progress-bar {
    height: 100%;
    background-color: #0073aa;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .vortem-stats {
        flex-direction: column;
    }
    
    .stat-box {
        margin-bottom: 10px;
    }
}

/* Product Modal Styles */
.vortem-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.vortem-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.vortem-modal-header {
    background: #f1f1f1;
    padding: 20px;
    border-bottom: 1px solid #ccd0d4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vortem-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.vortem-modal-close {
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.vortem-modal-close:hover {
    color: #000;
}

.vortem-modal-body {
    padding: 20px;
}

/* Product View Styles */
.vortem-product-view {
    max-width: 100%;
}

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

.product-title {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.product-status {
    margin-left: 20px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-synced {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.product-content {
    display: flex;
    gap: 30px;
}

.product-details-column {
    flex: 2;
}

.product-actions-column {
    flex: 1;
    min-width: 300px;
}

.product-image-section {
    margin-bottom: 30px;
}

.product-image-section img {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

.product-info-section,
.product-description-section,
.product-actions,
.product-metadata {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.product-info-section h2,
.product-description-section h2,
.product-actions h2,
.product-metadata h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.product-description {
    line-height: 1.6;
    color: #555;
}



.metadata-content p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

/* Product Edit Styles */
.vortem-product-edit {
    max-width: 100%;
}

.product-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.product-edit-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.product-edit-content {
    display: flex;
    gap: 30px;
}

.product-edit-column {
    flex: 2;
}

.product-edit-sidebar {
    flex: 1;
    min-width: 300px;
}

.product-image-section h2,
.product-info-section h2,
.product-description-section h2,
.product-data-section h2,
.product-actions-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 10px;
}

.product-image-section,
.product-info-section,
.product-description-section,
.product-data-section,
.product-actions-section {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-table th {
    width: 150px;
    padding: 10px 10px 10px 0;
    vertical-align: top;
}

.form-table td {
    padding: 10px 0;
}

.form-table input,
.form-table select,
.form-table textarea {
    width: 100%;
    max-width: 400px;
}

.form-table .description {
    font-style: italic;
    color: #666;
    font-size: 13px;
    margin-top: 5px;
}

.product-data-content p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

/* Responsive Design for Product Views */
@media (max-width: 1024px) {
    .product-content,
    .product-edit-content {
        flex-direction: column;
    }
    
    .product-actions-column,
    .product-edit-sidebar {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .vortem-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .product-header,
    .product-edit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .product-status {
        margin-left: 0;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 5px 0;
    }
    
    .form-table th {
        font-weight: bold;
        margin-bottom: 5px;
    }
}

/* Row Actions Styling */
.row-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.row-actions .button {
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.4;
    min-height: auto;
}

.row-actions .button-small {
    padding: 2px 6px;
    font-size: 10px;
}

/* Ensure buttons don't wrap awkwardly */
.row-actions .button:not(:last-child) {
    margin-right: 0;
}

/* Product Info Styling - Increased Height */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 60px;
    justify-content: flex-start;
    padding: 8px 0;
}

.product-title {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.product-category {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
    line-height: 1.3;
    margin-top: 2px;
}

.product-thumb {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    background: #f9f9f9;
    display: inline-block;
    margin-left: 10px;
}

/* Price Info Styling - More Compact */
.price-info {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
}

.price {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    line-height: 1.0;
    margin: 0;
}

.no-price {
    font-size: 12px;
    color: #646970;
    font-style: italic;
    line-height: 1.0;
    margin: 0;
}

.product-sku {
    font-size: 8px;
    color: #8c8f94;
    font-weight: 400;
    font-family: monospace;
    background: #f6f7f7;
    padding: 0px 3px;
    border-radius: 2px;
    border: 1px solid #dcdcde;
    line-height: 1.0;
    margin: 0;
}

/* Status Badge Styling */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.2;
}

.status-synced {
    background-color: #4CAF50;
}

.status-pending {
    background-color: #ff9800;
}

.status-failed {
    background-color: #f44336;
}

/* Sync Date Styling */
.sync-date {
    font-size: 11px;
    color: #646970;
    line-height: 1.2;
}

/* General Table Cell Padding Reduction */
.wp-list-table td {
    padding: 6px 8px !important;
    vertical-align: middle;
}