/**
 * Container Search Styles with WooCommerce Integration
 */

/* Container Search Form */
.container-search-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.container-search-title {
    margin-bottom: 20px;
    text-align: center;
    font-size: 28px;
    color: #333;
}

.container-search-form {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.container-search-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .container-search-filters {
        grid-template-columns: repeat(3, 1fr);
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #444;
}

.filter-group select,
.filter-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.search-button,
.add-to-cart-button {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.search-button:hover,
.add-to-cart-button:hover {
    background-color: #0052a3;
}

.reset-button {
    background-color: #f2f2f2;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.reset-button:hover {
    background-color: #e6e6e6;
}

/* Map */
#container-map-wrapper {
    margin-bottom: 30px;
}

#container-map {
    height: 400px;
    border-radius: 8px;
    border: 1px solid #ddd;
    z-index: 1;
}

/* Loading Indicator */
.container-search-loading {
    display: none;
    text-align: center;
    padding: 30px 0;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 102, 204, 0.2);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Section */
.container-search-results {
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.results-count {
    background-color: #0066cc;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.container-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .container-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .container-results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Container Card */
.container-card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.container-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.container-header {
    background-color: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container-type {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.container-price {
    font-weight: 700;
    font-size: 20px;
    color: #0066cc;
}

.container-details {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.container-detail-item {
    margin-bottom: 10px;
}

.container-detail-item:last-child {
    margin-bottom: 0;
}

.container-detail-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    width: 90px;
}

.container-location {
    padding: 15px;
    background-color: #f5f9ff;
    border-bottom: 1px solid #e0e0e0;
}

.location-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.container-distance {
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.container-actions {
    padding: 15px;
    margin-top: auto;
}

.inquiry-button {
    background-color: #5cb85c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
    transition: background-color 0.2s;
}

.inquiry-button:hover {
    background-color: #4cae4c;
}

.add-to-cart-button {
    width: 100%;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

/* WooCommerce Cart Actions */
.container-cart-actions {
    display: none;
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.view-cart-button,
.checkout-button {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.view-cart-button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.checkout-button {
    background-color: #5cb85c;
    color: white;
    border: none;
}

.view-cart-button:hover {
    background-color: #e6e6e6;
    text-decoration: none;
}

.checkout-button:hover {
    background-color: #4cae4c;
    text-decoration: none;
}

/* No Results */
.container-no-results {
    display: none;
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.container-no-results h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.container-no-results p {
    color: #666;
    margin-bottom: 0;
}

/* Map Popup Styles */
.map-popup {
    min-width: 200px;
}

.map-popup h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
}

.map-popup p {
    margin-top: 0;
    margin-bottom: 5px;
}

.map-popup ul {
    margin-top: 10px;
    margin-bottom: 0;
    padding-left: 20px;
}

.map-popup li {
    margin-bottom: 3px;
    font-size: 13px;
}
