/**
 * Vendor Map Styles
 *
 * @package MallorcaRenting
 * @since 1.0.0
 */

.vendor-map-container {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.vendor-map-controls {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.vendor-search {
    flex: 1;
    min-width: 250px;
}

.vendor-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.vendor-search input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 124, 186, 0.25);
    outline: 0;
}

.vendor-filters {
    display: flex;
    gap: 10px;
}

.vendor-filters select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

#vendor-map {
    border: none;
    display: block;
}

.vendor-map-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin: 20px;
}

/* Modal Styles */
.vendor-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.vendor-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInDown 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

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

/* Vendor Details */
.vendor-details {
    padding: 20px;
}

.vendor-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.vendor-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.vendor-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.vendor-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.star {
    color: #ffc107;
    font-size: 16px;
}

.star-empty {
    color: #e0e0e0;
}

.rating-text {
    color: #666;
    font-size: 14px;
}

.vendor-info > div {
    margin-bottom: 15px;
}

.vendor-info strong {
    color: #333;
    font-weight: 600;
}

.vendor-description {
    color: #666;
    line-height: 1.6;
}

.vendor-address p,
.vendor-phone a,
.vendor-email a {
    margin: 5px 0 0 0;
    color: #555;
}

.vendor-phone a,
.vendor-email a {
    text-decoration: none;
    color: #007cba;
}

.vendor-phone a:hover,
.vendor-email a:hover {
    text-decoration: underline;
}

.vendor-website {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #007cba;
    color: white;
}

.btn-primary:hover {
    background-color: #005a87;
    color: white;
    text-decoration: none;
}

/* Products Grid */
.vendor-products {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.vendor-products h4 {
    margin-bottom: 15px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.product-item {
    text-align: center;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.product-item a {
    text-decoration: none;
    color: inherit;
}

.product-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.product-item h5 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.3;
}

.product-item .price {
    color: #28a745;
    font-weight: 600;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vendor-map-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .vendor-filters {
        flex-direction: column;
    }

    .vendor-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .vendor-header {
        flex-direction: column;
        text-align: center;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .vendor-search {
        min-width: 100%;
    }
}

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

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

/* Custom Map Markers */
.custom-marker {
    background: #007cba;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.1);
}

.custom-marker.accommodation {
    background: #28a745;
}

.custom-marker.activity {
    background: #ffc107;
    color: #333;
}

.custom-marker.restaurant {
    background: #dc3545;
}

.custom-marker.transport {
    background: #6f42c1;
}

/* Loading States */
.vendor-map-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #666;
}

.vendor-map-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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