/**
 * Public CSS for Multiloca Lite
 */

/* General styling */
.multiloca-lite-inventory {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
}

.multiloca-lite-inventory h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

/* Table view */
.multiloca-lite-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
}

.multiloca-lite-table th,
.multiloca-lite-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.multiloca-lite-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
}

.multiloca-lite-table tr:hover {
    background-color: #f9f9f9;
}

.multiloca-lite-table tr.out-of-stock {
    color: #a0a0a0;
}

/* List view */
.multiloca-lite-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}


.multiloca-lite-list .location-name {
    font-weight: bold;
    margin-right: 5px;
}

.multiloca-lite-list li.out-of-stock {
    color: #a0a0a0;
}

/* Card view */
.multiloca-lite-location-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.multiloca-lite-location-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    box-sizing: border-box;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.multiloca-lite-location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #d1d5db;
}

.multiloca-lite-location-card .card-header {
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
    position: relative;
}

.multiloca-lite-location-card .location-name h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

.multiloca-lite-location-card .location-stock {
    margin: 0;
    display: flex;
    align-items: center;
}

.multiloca-lite-location-card .card-body {
    padding: 15px;
}

.multiloca-lite-location-card .location-address {
    display: flex;
    align-items: flex-start;
}

.multiloca-lite-location-card .location-address .address-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.multiloca-lite-location-card .location-address .address-text {
    font-size: 14px;
    color: #0f172a;
    line-height: 2.5;
    font-weight: 500;
}

.multiloca-lite-location-card .contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px;
}

.multiloca-lite-location-card .contact-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.multiloca-lite-location-card .contact-label {
    font-weight: 600;
    color: #374151;
    min-width: 50px;
}
.multiloca-lite-location-card .contact-value {
    color: #374151;
    font-weight: 500;
}
/* Expanded view */
.multiloca-lite-location-expanded-item {
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.multiloca-lite-location-header {
    padding: 12px 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.multiloca-lite-location-header:hover {
    background-color: #f5f5f5;
}

.multiloca-lite-location-header h4 {
    margin: 0;
    font-size: 16px;
}

.multiloca-lite-location-details {
    padding: 15px;
    display: none;
    border-top: 1px solid #e5e5e5;
    background: #fff;
}

.multiloca-toggle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
}

/* Simple text view */
.multiloca-lite-simple-text {
    margin: 0;
}

.multiloca-lite-location-text {
    background: #fff;
    margin-bottom: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.multiloca-lite-location-cards .stock.in-stock::before,
.multiloca-lite-location-cards .stock.out-of-stock::before,
.multiloca-lite-list .stock.in-stock::before,
.multiloca-lite-list .stock.out-of-stock::before,
.multiloca-lite-table .stock.in-stock::before,
.multiloca-lite-table .stock.out-of-stock::before {
    content: '' !important; 
    margin-right: 0 !important;
}

.multiloca-lite-location-item,
.multiloca-lite-list li {
    border: 1px solid #ccc;
    padding: 5px 15px;
    margin-bottom: 15px;
}


.multiloca-lite-location-text .location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.multiloca-lite-location-text .location-name {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    margin: 0;
}

.multiloca-lite-location-text .location-stock {
    font-size: 14px;
    font-weight: 500;
}

.multiloca-lite-location-text .stock-amount {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

.multiloca-lite-location-text .stock-label {
    color: #059669;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.multiloca-lite-location-text .stock-label.out-of-stock {
    color: #dc2626;
    background: #fee2e2;
}

.multiloca-lite-location-text .location-address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
}

.multiloca-lite-location-text .location-icon {
    font-size: 14px;
    margin-top: 1px;
}

.multiloca-lite-location-text .address-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.4;
}

.multiloca-lite-location-text .location-contact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

.multiloca-lite-location-text .contact-email {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.multiloca-lite-location-text .contact-email:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.multiloca-lite-location-text .contact-phone {
    color: #6b7280;
}

/* Placeholder message styling */
.multiloca-variation-notice {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 20px;
    background: #f8fafc;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin: 0;
}

/* Popup view */
.multiloca-lite-popup-container {
    position: relative;
}

.multiloca-lite-popup-trigger {
    padding: 8px 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.multiloca-lite-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.multiloca-lite-popup-content {
    position: relative;
    background: #fff;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.multiloca-lite-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    line-height: 1;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.multiloca-lite-popup-location {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Drawer view */
.multiloca-lite-drawer-container {
    position: relative;
}

.multiloca-lite-drawer-trigger {
    padding: 8px 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.multiloca-lite-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    max-width: 80vw;
    height: 100%;
    background: #fff;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transition: right 0.3s ease;
}

.multiloca-lite-drawer.active {
    right: 0;
}

.multiloca-lite-drawer-content {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.multiloca-lite-drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    line-height: 1;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.multiloca-lite-drawer-location {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.multiloca-lite-drawer-address {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}


/* Loading and error states */
.multiloca-loading-placeholder,
.multiloca-error-placeholder {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 20px 0;
}

.multiloca-loading-placeholder {
    border-color: #3b82f6;
    color: #1e40af;
}

.multiloca-error-placeholder {
    border-color: #ef4444;
    color: #dc2626;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

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

.multiloca-loading-placeholder p,
.multiloca-error-placeholder p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
/* Responsive Design */
@media (max-width: 768px) {
    .multiloca-lite-location-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .multiloca-lite-location-card .card-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .multiloca-lite-location-card .card-body {
        padding: 20px;
    }
    
    .multiloca-lite-location-card .location-name h4 {
        font-size: 16px;
    }
    
    .multiloca-lite-location-text .location-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .multiloca-lite-location-text {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .multiloca-lite-location-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .multiloca-lite-location-card {
        min-height: auto;
    }
    
    .multiloca-lite-location-card .card-header {
        padding: 14px 16px;
    }
    
    .multiloca-lite-location-card .card-body {
        padding: 16px;
    }
    
    .multiloca-lite-location-card .location-name h4 {
        font-size: 16px;
    }
    
    .multiloca-lite-location-card .location-address,
    .multiloca-lite-location-card .location-contact {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .multiloca-lite-location-card .contact-item,
    .multiloca-lite-location-card .address-text {
        font-size: 13px;
    }
    
    .multiloca-lite-table th,
    .multiloca-lite-table td {
        padding: 8px;
    }
    
    .multiloca-lite-location-text .location-contact {
        font-size: 13px;
    }
    
    .multiloca-lite-location-text .address-text {
        font-size: 13px;
    }
}
