/* Remove WooCommerce overrides - let theme handle styling */

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

.kiikiis-modal .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.kiikiis-modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
    z-index: 1001;
}

.kiikiis-modal .close:hover,
.kiikiis-modal .close:focus {
    color: #000;
    text-decoration: none;
}

/* Multi-vendor order indicators */
.status-completed { color: #28a745; }
.status-processing { color: #ffc107; }
.status-pending { color: #6c757d; }
.status-cancelled { color: #dc3545; }
.status-refunded { color: #fd7e14; }

/* Main Dashboard Styles */
.kiikiis-vendor-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.dashboard-header h1 {
    margin: 0 0 10px;
    color: #23282d;
    font-size: 28px;
}

.dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.dashboard-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    border-bottom: 1px solid #ddd;
}

.dashboard-nav li {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: -1px;
}

.dashboard-nav a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    border: 1px solid #ddd;
    border-bottom: none;
    background: #f5f5f5;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dashboard-nav a:hover {
    background: #f0f0f0;
    color: #0073aa;
}

.dashboard-nav a.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    color: #0073aa;
    margin-bottom: -1px;
}

.dashboard-content {
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    padding: 20px;
    border-radius: 4px;
}

/* Products List */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.products-header h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 400;
    line-height: 1.3;
}

.products-list table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.products-list th {
    text-align: left;
    padding: 12px;
    background: #f9f9f9;
    border-bottom: 1px solid #e1e1e1;
    font-weight: 600;
    color: #23282d;
}

.products-list td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.products-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

.products-list tr:hover {
    background-color: #f5f5f5;
}

.products-list .product-thumbnail img {
    width: 40px;
    height: auto;
    border-radius: 2px;
}

.products-list .actions {
    white-space: nowrap;
}

.products-list .actions .button {
    margin-right: 5px;
    padding: 4px 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* Modal */
.kiikiis-modal {
    display: none;
    position: fixed;
    z-index: 100100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.kiikiis-modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 25px;
    border-radius: 4px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: 300;
    color: #777;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.close:hover {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #32373c;
    box-shadow: 0 0 0 transparent;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
    outline: 2px solid transparent;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-row .form-group {
    flex: 1 0 0;
    padding: 0 10px;
    margin-bottom: 15px;
    min-width: 150px;
}

.form-actions {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* Image Upload */
.image-preview {
    margin: 10px 0;
    min-height: 100px;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.2s;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 3px;
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 0;
    min-height: 100px;
    border: 2px dashed #ddd;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.gallery-preview .no-images {
    width: 100%;
    text-align: center;
    color: #999;
    margin: 20px 0;
    font-style: italic;
}

.gallery-thumb {
    position: relative;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
}

.gallery-thumb img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.gallery-thumb .remove-image {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-thumb:hover .remove-image {
    opacity: 1;
}

/* Status Badges */
.status-publish {
    color: #46b450;
    background: #ecf7ed;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    color: #ffb900;
    background: #fff8e5;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-draft {
    color: #a7aaad;
    background: #f6f7f7;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    background-color: #f6f7f7;
    transition: all 0.1s ease-in-out;
    box-shadow: 0 1px 0 #ccc;
    text-shadow: none;
}

.button:hover {
    background: #f0f0f1;
    border-color: #999;
    color: #135e96;
}

.button:active {
    background: #f0f0f1;
    border-color: #999;
    box-shadow: inset 0 2px 5px -3px rgba(0,0,0,0.3);
    transform: translateY(1px);
}

.button-primary {
    color: #fff;
    background-color: #2271b1;
    border-color: #2271b1;
    text-shadow: none;
    box-shadow: 0 1px 0 #135e96;
}

.button-primary:hover {
    background: #135e96;
    border-color: #0a4b78;
    color: #fff;
}

.button-primary:active {
    background: #0a4b78;
    border-color: #0a4b78;
    box-shadow: inset 0 2px 5px -3px rgba(0,0,0,0.5);
}

/* Loading State */
.kiikiis-modal.loading .modal-content:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kiikiis-modal.loading .modal-content:before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -15px 0 0 -15px;
    z-index: 11;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 782px) {
    .form-row {
        flex-direction: column;
        margin: 0;
    }
    
    .form-row .form-group {
        padding: 0;
        flex: 1 0 100%;
    }
    
    .modal-content {
        width: 90%;
        margin: 30px auto;
        padding: 15px;
    }
    
    .products-list table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .products-list .actions {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .dashboard-nav li {
        display: block;
        margin: 0 0 5px;
    }
    
    .dashboard-nav a {
        border-radius: 4px;
        border: 1px solid #ddd;
    }
    
    .dashboard-nav a.active {
        border-bottom: 1px solid #ddd;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-header h2 {
        margin-bottom: 15px;
    }
}

.kiikiis-vendor-shop-page .shop-sidebar,
.kiikiis-vendor-shop-shortcode .shop-sidebar {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    padding: 14px 14px 12px;
    max-height: 420px;
    overflow: hidden;
}

.kiikiis-vendor-shop-page .shop-sidebar h3,
.kiikiis-vendor-shop-shortcode .shop-sidebar h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    line-height: 1.2;
    color: #111827;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

.kiikiis-vendor-shop-page .shop-categories-scroll,
.kiikiis-vendor-shop-shortcode .shop-categories-scroll {
    max-height: 350px;
}

.kiikiis-vendor-shop-page .shop-categories-viewport,
.kiikiis-vendor-shop-shortcode .shop-categories-viewport {
    max-height: 350px;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

.kiikiis-vendor-shop-page .shop-categories-viewport::-webkit-scrollbar,
.kiikiis-vendor-shop-shortcode .shop-categories-viewport::-webkit-scrollbar {
    width: 10px;
}

.kiikiis-vendor-shop-page .shop-categories-viewport::-webkit-scrollbar-track,
.kiikiis-vendor-shop-shortcode .shop-categories-viewport::-webkit-scrollbar-track {
    background: transparent;
}

.kiikiis-vendor-shop-page .shop-categories-viewport::-webkit-scrollbar-thumb,
.kiikiis-vendor-shop-shortcode .shop-categories-viewport::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.18);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

.kiikiis-vendor-shop-page .shop-categories-viewport:hover::-webkit-scrollbar-thumb,
.kiikiis-vendor-shop-shortcode .shop-categories-viewport:hover::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.28);
    border: 3px solid transparent;
    background-clip: content-box;
}

.kiikiis-vendor-shop-page .shop-categories li,
.kiikiis-vendor-shop-shortcode .shop-categories li {
    margin: 2px 0;
}

.kiikiis-vendor-shop-page .shop-categories li.has-children > a,
.kiikiis-vendor-shop-shortcode .shop-categories li.has-children > a {
    font-weight: 500;
}

.kiikiis-vendor-shop-page .shop-categories li.active > a,
.kiikiis-vendor-shop-shortcode .shop-categories li.active > a {
    background: transparent;
    color: #2563eb;
    font-weight: 700;
}

.kiikiis-vendor-shop-page .shop-categories a,
.kiikiis-vendor-shop-shortcode .shop-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.kiikiis-vendor-shop-page .shop-categories a:hover,
.kiikiis-vendor-shop-shortcode .shop-categories a:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #1f2937;
}

.kiikiis-vendor-shop-page .shop-categories-drilldown a[data-has-children="1"]::after,
.kiikiis-vendor-shop-shortcode .shop-categories-drilldown a[data-has-children="1"]::after {
    color: #9ca3af;
    font-weight: 800;
}

/* Vendor Dashboard Styles */
.kiikiis-vendor-dashboard{max-width:1100px;margin:32px auto;padding:0 16px;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111827}
.kiikiis-vendor-dashboard .dashboard-header{background:linear-gradient(135deg,#0ea5e9,#2563eb);border-radius:18px;padding:22px 22px 18px;color:#fff;box-shadow:0 12px 28px rgba(17,24,39,.12)}
.kiikiis-vendor-dashboard .dashboard-header h1{margin:0;font-size:28px;line-height:1.2;font-weight:800}
.kiikiis-vendor-dashboard .dashboard-header p{margin:8px 0 0;opacity:.95}
.kiikiis-vendor-dashboard .dashboard-nav{margin-top:14px;background:transparent;border:0}
.kiikiis-vendor-dashboard .dashboard-nav .kiikiis-tabs{display:flex;flex-wrap:wrap;gap:10px;padding:10px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 10px 20px rgba(17,24,39,.06)}
.kiikiis-vendor-dashboard .dashboard-nav a{display:inline-flex;align-items:center;gap:8px;padding:10px 12px;border-radius:10px;text-decoration:none;font-weight:700;font-size:14px;color:#1f2937;border:1px solid transparent}
.kiikiis-vendor-dashboard .dashboard-nav a:hover{background:#f3f4f6;border-color:#e5e7eb}
.kiikiis-vendor-dashboard .dashboard-nav a.is-active{background:#111827;color:#fff}
.kiikiis-vendor-dashboard .dashboard-content{margin-top:18px}
.kiikiis-vendor-dashboard .kiikiis-panel{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:18px;box-shadow:0 10px 20px rgba(17,24,39,.06)}
.kiikiis-vendor-dashboard .kiikiis-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.kiikiis-vendor-dashboard .kiikiis-stat{grid-column:span 4;background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:16px;box-shadow:0 10px 20px rgba(17,24,39,.06)}
.kiikiis-vendor-dashboard .kiikiis-stat h3{margin:0 0 8px;font-size:13px;letter-spacing:.02em;text-transform:uppercase;color:#6b7280}
.kiikiis-vendor-dashboard .kiikiis-stat .value{font-size:26px;font-weight:900;color:#111827}
.kiikiis-vendor-dashboard .kiikiis-muted{color:#6b7280}
.kiikiis-vendor-dashboard table{width:100%;border-collapse:separate;border-spacing:0}
.kiikiis-vendor-dashboard th,.kiikiis-vendor-dashboard td{padding:12px 10px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top}
.kiikiis-vendor-dashboard th{font-size:12px;text-transform:uppercase;letter-spacing:.02em;color:#6b7280}
.kiikiis-vendor-dashboard .button{border-radius:10px}
@media (max-width: 900px){.kiikiis-vendor-dashboard .kiikiis-stat{grid-column:span 6}}
@media (max-width: 560px){.kiikiis-vendor-dashboard .kiikiis-stat{grid-column:span 12}.kiikiis-vendor-dashboard .dashboard-header h1{font-size:22px}}

/* Vendor Dashboard Shortcode Styles (kiikiis-vd-* classes) */
.kiikiis-vendor-dashboard .kiikiis-vd-header{background:linear-gradient(135deg,#0ea5e9,#2563eb);color:#fff;padding:22px 22px 18px;border-radius:18px;margin-bottom:16px;box-shadow:0 12px 28px rgba(17,24,39,.12)}
.kiikiis-vendor-dashboard .kiikiis-vd-header h1{margin:0 0 6px 0;font-size:28px;line-height:1.2;font-weight:800}
.kiikiis-vendor-dashboard .kiikiis-vd-header p{margin:0;opacity:.95}
.kiikiis-vendor-dashboard .kiikiis-vd-stats{display:grid;grid-template-columns:repeat(12,1fr);gap:14px;margin:14px 0 18px}
.kiikiis-vendor-dashboard .kiikiis-vd-stat{grid-column:span 4;background:#fff;padding:16px;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 10px 20px rgba(17,24,39,.06)}
.kiikiis-vendor-dashboard .kiikiis-vd-stat .kiikiis-vd-stat-label{color:#6b7280;font-size:12px;text-transform:uppercase;letter-spacing:.06em;font-weight:800}
.kiikiis-vendor-dashboard .kiikiis-vd-stat .kiikiis-vd-stat-value{font-size:26px;font-weight:900;color:#111827;margin-top:6px}
.kiikiis-vendor-dashboard .kiikiis-vd-panel{background:#fff;padding:18px;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 10px 20px rgba(17,24,39,.06);margin:16px 0}
.kiikiis-vendor-dashboard .kiikiis-vd-panel h3{margin:0 0 10px 0;color:#111827}
.kiikiis-vendor-dashboard .kiikiis-vd-muted{color:#6b7280}
.kiikiis-vendor-dashboard .kiikiis-vd-button{display:inline-block;background:#111827;color:#fff;padding:10px 14px;text-decoration:none;border-radius:10px;font-weight:800;border:1px solid #111827;transition:background .2s ease,border-color .2s ease}
.kiikiis-vendor-dashboard .kiikiis-vd-button:hover{background:#0b1220;border-color:#0b1220;color:#fff}
.kiikiis-vendor-dashboard .kiikiis-vd-actions{display:grid;grid-template-columns:repeat(12,1fr);gap:14px;margin:16px 0}
.kiikiis-vendor-dashboard .kiikiis-vd-action{grid-column:span 6;background:#fff;padding:18px;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 10px 20px rgba(17,24,39,.06)}
.kiikiis-vendor-dashboard .kiikiis-vd-action h3{margin:0 0 8px 0;font-size:16px}
.kiikiis-vendor-dashboard .kiikiis-vd-action p{margin:0 0 12px 0;color:#6b7280}
.kiikiis-vendor-dashboard .kiikiis-vd-quick-links ul{list-style:none;padding:0;margin:0}
.kiikiis-vendor-dashboard .kiikiis-vd-quick-links li{margin:8px 0}
.kiikiis-vendor-dashboard .kiikiis-vd-quick-links a{color:#2563eb;text-decoration:none;font-weight:700}
.kiikiis-vendor-dashboard .kiikiis-vd-quick-links a:hover{text-decoration:underline}
@media (max-width: 900px){.kiikiis-vendor-dashboard .kiikiis-vd-stat{grid-column:span 6}.kiikiis-vendor-dashboard .kiikiis-vd-action{grid-column:span 12}}
@media (max-width: 560px){.kiikiis-vendor-dashboard .kiikiis-vd-stat{grid-column:span 12}.kiikiis-vendor-dashboard .kiikiis-vd-header h1{font-size:22px}}
