/** 
* Widget Form
*/

#starting-point {
    margin-top: 30px;
    padding: 10px;
}

#destination-point {
    margin-top: 30px;
    padding: 10px;
}


/** 
* Auto Complete 
*/
.coffeetrail-routing-widget .input-container {
    position: relative;
}

.autocomplete-results {
    position: relative;
    width: 100%;
    max-height: 130px;
    overflow-y: auto;
    background: #ffffff;
    border: 1.5px solid rgba( 0,0,0, 0.2);
    border-radius: 0 0 4px 4px;
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    left: 0;
    top: 1%;
}

.coffeetrail-routing-widget .result {
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.coffeetrail-routing-widget .result:last-child {
    border-bottom: none;
}

.coffeetrail-routing-widget .result:hover {
    background: #f9f9f9;
}

.coffeetrail-routing-widget button {
    margin-top: 35px;
    width: 87%;
    min-height: 44px;
}

.coffeetrail-routing-widget button:hover {
    background-color: #1e8a54;
}


/** 
* Routes
*/

#routes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around; 
    gap: 10px;
    margin-top: 35px;
    z-index: 9999;
    min-width: 90%;
}

.route-card {
    flex: 1 1 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    border-right: 4px solid #219156;
    margin-bottom: 10px;
}

.slider-route-card {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding-right: 10px;
    background: white;
    cursor: pointer;
    border-radius: 15px;
    border-right: 4px solid #219156;
    margin-top: 20px;
}

/** 
* Overall
*/

.coffeetrail-routing-widget {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 117px) !important;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.inputs-row {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
    width: 100%;
    margin: 0;
    height: 100vh;
    z-index: 1;
}

.map-container {
    display: flex;
    flex-direction: column;
    flex: 4.1;
    background-color: #fff;
}

.middle-column {
    display: flex;
    align-items: center;
    flex-direction: column;
    flex: 1.6;
    padding: 15px;
    background-color: #fafafa;
    box-shadow: inset 2px 0px 4px rgba(0,0,0,.0705882353);
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

.input-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    flex: 1.3;
    background-color: #fff;
    overflow: auto;
    height: 100%;
	padding: 0px;
}

.lf-item-container {
    overflow: unset !important;
}

/* Responsive design for mobile devices */
 @media (max-width: 767px) {

    .coffeetrail-routing-widget {
        height: calc(100vh - 89px) !important;
        align-items: center;
    }

    .inputs-row {
        flex-direction: column;
    }

    .input-container {
        height: auto;
    }

    .autocomplete-results {
        min-height: 150px;
    }

    .autocomplete-results:empty {
        min-height: auto;
    }

    .middle-column {
        flex: 4;
        display: none;
    }

    .map-container {
        order: 3;
        width: 100%;
        display: none;
        overflow-y: auto;
        align-items: center;
    }

    #routes-container {
        display: none;
    }

    .swiper15 {
        width: 92% !important;
        top: 55px !important;
    } 

    .leaflet-swiper-pane {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    #routingMap {
        width: 100%;
    }

} 

@media (min-width: 768px) {

    .floating-button {
        display: none;
    }

    .swiper15 {
        display: none;
    }

}

/** Floating Button */
.floating-button {
    position: fixed;
    bottom: 20px;
    padding: 10px 20px;
    background-color: #fff;
    color: #242429;
    border: none;
    border-radius: 5px !important;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    width: auto !important;
    height: 46px !important;
    font-size: 15px;
    display: none;
}

.floating-button:hover {
    background-color: #fff !important;
}

.elementor-location-footer {
    display: none !important;
}

/* Floating Labels*/

.floating-label-field {
    width: 85%;
    position: relative;
}

.floating-label-field .clear-input-starting, .floating-label-field .clear-input-destination {
    position: absolute;
    bottom: 15px;
    left: 10px;
    background-color: #c4c4c4;
    border-radius: 42px;
    padding: 0 7px;
    padding-bottom: 1px;
    display: none;
}

.floating-label-field label {
    position: relative;
    left: 0px;
    top: 55px;
    transition: 0.3s ease-in-out;
    pointer-events: none;
}

.floating-label-field.active-floating-label label {
    top: 35px;
    color: #232328;
}

.attention-note {
    margin-top: 15px;
    width: 80%;
    font-size: 12px;
}

.go-to-explore-page {
    position: absolute;
    text-decoration: underline !important;
    bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.swiper15 {
    overflow-x: hidden;
}

.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    height: 60px;
    font-size: 16px;
}

.mobile-header-current-way {
    font-weight: 600;
}

/** Modal */

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 300px;
}

.modal-content .modalButton {
    width: 100%;
    margin-top: 0;
}

.modal-content p {
    margin-top: 0;
}

/** Filters */

.filter-section {
    display: flex;
    flex-wrap: wrap;
    width: 86%;
    margin-top: 20px;
    padding-top: 10px;
}

.filter-section h4 {
    flex: 1 1 100%;
    margin-bottom: 10px;
    font-size: 0.8em !important;
}

.filter-section div {
    margin-bottom: 5px;
    padding-right: 10px;
}

.filter-section div label {
    padding-right: 5px;
}

.leaflet-popup-content-wrapper .leaflet-popup-content {
    margin: 0 !important;
}

.leaflet-popup-content-wrapper {
    padding: 0 !important;
}

/* Share Button and Modal Styles */
.share-route-btn {
    position: fixed !important;
    bottom: 50px !important;
    left: 20px !important;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important; /* Keep circular shape */
    background-color: rgb(30, 138, 84) !important; /* Match the specified green */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 999 !important;
    padding: 0 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    color: rgb(255, 255, 255) !important; /* White text */
    font-family: "Rubik", sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 16px !important;
    opacity: 0.9 !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.share-route-btn:hover {
    background-color: rgb(33, 145, 86) !important; /* Slightly darker on hover */
    opacity: 1 !important;
}

/* Updated Modal Styles */
.modal.share-modal {
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    display: none !important;
    justify-content: center !important;
    align-items: center !important;
    font-family: 'Segoe UI', Roboto, sans-serif !important;
}

.modal.share-modal.show {
    display: flex !important;
}

.share-modal .modal-content {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 360px !important;
    padding: 24px 20px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    text-align: center !important;
    border: none !important;
}

.share-modal h2 {
    font-family: "Alef", Sans-serif;
    color: #333 !important;
    margin-top: 0px;
    margin-bottom: 0px;
    font-weight: bold;
}

.modal.share-modal.show .modal-content {
    animation: slideFadeIn 0.35s ease-out;
}

@keyframes slideFadeIn {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.share-options {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
}

.share-option-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    padding: 12px 16px !important;
    background-color: #f8f9fa !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #333 !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

.share-option-btn:hover {
    background-color: #e2e6ea !important;
}

.share-option-btn svg {
    flex-shrink: 0 !important;
    margin-left: 10px !important;
}

.share-option-btn span {
    text-align: right !important;
}

.share-modal .modalButton {
    margin-top: 10px !important;
    padding: 10px 16px !important;
    background-color: #e0e0e0 !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    width: auto !important;
}

.share-modal .modalButton:hover {
    background-color: #209C62 !important;
}

/* Improved toast notification */
.toast-notification {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #21956a !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    z-index: 100000 !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
}
.share-options-horizontal {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    gap: 12px !important;
    width: 100% !important;
    direction: rtl;
}

.share-option-btn-horizontal {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-end !important;
    background: none !important;
    border: none !important;
    padding: 12px 8px !important;
    margin: 0 4px !important;
    cursor: pointer !important;
    min-width: 64px;
    min-height: 80px;
    border-radius: 12px !important;
    transition: background 0.2s;
}

.share-option-btn-horizontal:active,
.share-option-btn-horizontal:focus {
    background: #f2f2f2 !important;
}

.share-option-btn-horizontal svg {
    display: block;
    margin: 0 auto 6px auto;
    width: 32px;
    height: 32px;
}

.share-option-btn-horizontal span {
    font-family: 'Rubik', Arial, sans-serif;
    font-size: 13px;
    color: #222;
    font-weight: 400;
    text-align: center;
    margin-top: 2px;
    direction: rtl;
    white-space: nowrap;
}

.modalCloseBtn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background 0.2s;
    margin-top: 0px !important;
    width: 36px !important;
    height: 36px; 
    min-height: 36px !important;
}

.modalCloseBtn:active,
.modalCloseBtn:focus {
    background: #f2f2f2;
}

.modalCloseBtn svg {
    display: block;
    width: 22px;
    height: 22px;
}

.share-modal-content {
    position: relative;
    padding-top: 40px !important;
}