/**
 * 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 li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.multiloca-lite-list li:last-child {
    border-bottom: none;
}

.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: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.multiloca-lite-location-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    width: calc(33.33% - 15px);
    box-sizing: border-box;
    box-shadow: 0 2px 3px rgba(0,0,0,0.05);
}

.multiloca-lite-location-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.multiloca-lite-location-card .location-address,
.multiloca-lite-location-card .location-contact {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

/* Stock status */
.stock {
    font-weight: bold;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
}

.stock.in-stock {
    color: #0f834d;
    background-color: #f8f8f8;
}

.stock.out-of-stock {
    color: #e2401c;
    background-color: #f8f8f8;
}

/* 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 {
    line-height: 1.8;
}

.multiloca-lite-location-text {
    margin-bottom: 8px;
}

/* 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;
}

/* Responsive */
@media (max-width: 768px) {
    .multiloca-lite-location-card {
        width: calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .multiloca-lite-location-card {
        width: 100%;
    }
    .multiloca-lite-table th,
    .multiloca-lite-table td {
        padding: 8px;
    }
}
