/**
 * Elementor Widgets Styles
 * SPZServis Custom Features Plugin
 */

/* STK Single Widget Styles */
.stk-single-wrapper {
    max-width: 100%;
    font-family: inherit;
}

.stk-single-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
}

.stk-single-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stk-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.stk-field strong {
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 5px;
    display: block;
}

.stk-field span,
.stk-field div {
    color: #555;
    line-height: 1.5;
}

/* Address specific styles */
.stk-address-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Contact specific styles */
.stk-contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stk-phone,
.stk-email {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.stk-phone strong,
.stk-email strong {
    margin-right: 10px;
    margin-bottom: 0;
    min-width: 60px;
}

.stk-phone a,
.stk-email a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.stk-phone a:hover,
.stk-email a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Opening hours styles */
.stk-opening-hours div {
    white-space: pre-line;
    background: #fff;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Services styles */
.stk-services div {
    background: #fff;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Map styles */
.stk-map-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
    position: relative;
}

.stk-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.stk-map-error {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.stk-map-error div {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* Leaflet map adjustments */
.stk-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 8px;
}

.stk-map-container .leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.stk-map-container .leaflet-popup-content {
    margin: 8px 12px;
    line-height: 1.4;
}

/* Google Maps adjustments */
.stk-map-container .gm-style {
    border-radius: 8px;
}

.stk-map-container .gm-style-iw {
    border-radius: 4px;
}

/* Municipal Office Widget Styles */
.municipal-office-single-wrapper {
    max-width: 100%;
    font-family: inherit;
}

.municipal-office-single-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
}

.municipal-office-single-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.municipal-office-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 4px solid #2c5aa0;
    border-radius: 4px;
}

.municipal-office-field strong {
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 5px;
    display: block;
}

.municipal-office-field span,
.municipal-office-field div {
    color: #555;
    line-height: 1.5;
}

/* Basic info specific styles */
.municipal-office-basic-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.municipal-office-city,
.municipal-office-name,
.municipal-office-ds,
.municipal-office-fax {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.municipal-office-city strong,
.municipal-office-name strong,
.municipal-office-ds strong,
.municipal-office-fax strong {
    margin-bottom: 0;
    min-width: 80px;
}

/* Office hours styles */
.municipal-office-hours-items {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.municipal-office-hours-items li {
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.municipal-office-hours-items li:last-child {
    border-bottom: none;
}

/* People styles */
.municipal-office-people-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.municipal-office-person {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #2c5aa0;
}

.person-name {
    margin-bottom: 8px;
}

.person-name strong {
    color: #2c5aa0;
    font-size: 1.1em;
}

.person-position {
    margin-bottom: 8px;
    font-style: italic;
    color: #666;
}

.person-phone,
.person-email {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.person-phone strong,
.person-email strong {
    min-width: 60px;
}

.person-phone a,
.person-email a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.person-phone a:hover,
.person-email a:hover {
    color: #1a3d73;
    text-decoration: underline;
}

/* Map styles for municipal offices */
.municipal-office-map-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
    position: relative;
}

.municipal-office-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.municipal-office-map-error {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.municipal-office-map-error div {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

/* Leaflet map adjustments for municipal offices */
.municipal-office-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 8px;
}

.municipal-office-map-container .leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.municipal-office-map-container .leaflet-popup-content {
    margin: 8px 12px;
    line-height: 1.4;
}

/* Google Maps adjustments for municipal offices */
.municipal-office-map-container .gm-style {
    border-radius: 8px;
}

.municipal-office-map-container .gm-style-iw {
    border-radius: 4px;
}

/* Responsive styles for municipal offices */
@media (max-width: 768px) {
    .municipal-office-single-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .municipal-office-field {
        padding: 12px;
    }
    
    .municipal-office-city,
    .municipal-office-name,
    .municipal-office-ds,
    .municipal-office-fax,
    .person-phone,
    .person-email {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .municipal-office-city strong,
    .municipal-office-name strong,
    .municipal-office-ds strong,
    .municipal-office-fax strong,
    .person-phone strong,
    .person-email strong {
        margin-bottom: 5px;
    }
    
    .municipal-office-people-items {
        padding: 10px;
    }
    
    .municipal-office-person {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .municipal-office-single-title {
        font-size: 20px;
    }
    
    .municipal-office-field {
        padding: 10px;
    }
    
    .municipal-office-single-content {
        gap: 12px;
    }
}

/* Interactive Map Widget Styles */
.interactive-map-widget {
    width: 100%;
    font-family: inherit;
}

/* Filters Styles */
.interactive-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filters-container {
    width: 100%;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-input,
.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.filter-reset-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.filter-reset-btn:hover {
    background: #5a6268;
}

/* Map Styles */
.interactive-map-section {
    margin-bottom: 30px;
}

.interactive-map-container {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f5f5f5;
    position: relative;
}

.map-loading,
.listing-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 16px;
}

.listing-error,
.map-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
    font-size: 14px;
    margin: 20px;
}

/* Leaflet map adjustments */
.interactive-map-container .leaflet-container {
    height: 100%;
    width: 100%;
    border-radius: 8px;
}

.interactive-map-container .leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.interactive-map-container .leaflet-popup-content {
    margin: 8px 12px;
    line-height: 1.4;
}

/* Custom marker popup styles */
.marker-popup {
    max-width: 300px;
}

.marker-popup .popup-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.marker-popup .popup-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.marker-popup .popup-type.stk {
    background: #e3f2fd;
    color: #0073aa;
}

.marker-popup .popup-type.municipal {
    background: #e8f4fd;
    color: #2c5aa0;
}

.marker-popup .popup-address {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.marker-popup .popup-contact {
    font-size: 13px;
    margin-bottom: 10px;
}

.marker-popup .popup-contact a {
    color: #0073aa;
    text-decoration: none;
}

.marker-popup .popup-contact a:hover {
    text-decoration: underline;
}

.marker-popup .popup-link {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.marker-popup .popup-link:hover {
    background: #005a87;
    color: white;
}

/* Listing Styles */
.interactive-listing-section {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.listing-count {
    font-weight: 600;
    color: #333;
}

.interactive-listing {
    min-height: 200px;
    padding: 20px;
}

.listing-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.listing-item:hover {
    background: #f8f9fa;
}

.listing-item:last-child {
    border-bottom: none;
}

.listing-item-content {
    flex: 1;
}

.listing-item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.listing-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.listing-item-title a:hover {
    color: #0073aa;
}

.listing-item-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.listing-item-type.stk {
    background: #e3f2fd;
    color: #0073aa;
}

.listing-item-type.municipal {
    background: #e8f4fd;
    color: #2c5aa0;
}

.listing-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #666;
    font-size: 14px;
}

.listing-item-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.listing-item-actions {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.listing-item-link {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.listing-item-link:hover {
    background: #005a87;
    color: white;
}

/* Pagination Styles */
.listing-pagination-top,
.listing-pagination-bottom {
    padding: 15px 20px;
    text-align: center;
}

.listing-pagination-bottom {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.pagination-links {
    display: inline-flex;
    gap: 5px;
}

.pagination-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #f8f9fa;
    border-color: #0073aa;
    color: #0073aa;
}

.pagination-link.current {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .filters-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .listing-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .listing-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .listing-item-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .listing-item-details {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .interactive-filters {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .interactive-map-container {
        height: 400px;
    }
    
    .interactive-listing {
        padding: 15px;
    }
    
    .listing-header {
        padding: 10px 15px;
    }
    
    .listing-pagination-top,
    .listing-pagination-bottom {
        padding: 10px 15px;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .stk-single-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .stk-field {
        padding: 12px;
    }
    
    .stk-phone,
    .stk-email {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stk-phone strong,
    .stk-email strong {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .stk-single-title {
        font-size: 20px;
    }
    
    .stk-field {
        padding: 10px;
    }
    
    .stk-single-content {
        gap: 12px;
    }
}
