/**
 * QuickDent Location Module Styles
 */

/* Modal Backdrop & Transitions */
.location-gate-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Places Autocomplete Wrapper */
.place-autocomplete-container {
    position: relative;
    width: 100%;
}

.place-autocomplete-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.place-autocomplete-input {
    width: 100%;
    padding-right: 78px !important;
}

/* Action icons inside the right side of address input */
.place-autocomplete-actions {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 4;
}

.place-autocomplete-spinner {
    color: #007EEF;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.place-autocomplete-btn {
    background: transparent;
    border: none;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.place-autocomplete-btn:hover {
    background: #f1f5f9;
    color: #007EEF;
}

.place-autocomplete-btn:active {
    transform: scale(0.95);
}

/* Places Autocomplete Predictions Dropdown */
.place-autocomplete-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 14px;
    box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.12), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
    z-index: 1050;
    list-style: none;
    padding: 6px 0;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.place-autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.place-autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f8fafc;
}

.place-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 9999px;
}

.place-autocomplete-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.12s ease;
    border-bottom: 1px solid #f8fafc;
}

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

.place-autocomplete-item:hover,
.place-autocomplete-item.is-active {
    background-color: #f0f7ff;
}

.place-autocomplete-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #eff6ff;
    color: #007EEF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
}

.place-autocomplete-item.is-active .place-autocomplete-item-icon {
    background: #007EEF;
    color: #ffffff;
}

.place-autocomplete-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.place-autocomplete-item-main {
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-autocomplete-item-sec {
    font-family: 'Urbanist', sans-serif;
    font-weight: 500;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-autocomplete-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 2px;
    border-top: 1px solid #f1f5f9;
    font-size: 10.5px;
    color: #94a3b8;
    background: #fafafa;
}

/* Map Picker Modal */
.place-map-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.place-map-modal-backdrop.hidden {
    display: none !important;
}

.place-map-modal-card {
    background: #ffffff;
    width: 94vw;
    max-width: 860px;
    max-height: 90vh;
    border-radius: 22px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: placeModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes placeModalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.place-map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.place-map-modal-title {
    font-family: 'Urbanist', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.place-map-modal-subtitle {
    font-family: 'Urbanist', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: #64748b;
    margin: 3px 0 0;
}

.place-map-modal-close-btn {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.place-map-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.place-map-modal-search {
    padding: 14px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.place-map-search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.place-map-search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.place-map-modal-search-input {
    width: 100%;
    height: 44px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 38px 0 38px;
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    background: #ffffff;
    transition: all 0.15s ease;
}

.place-map-modal-search-input:focus {
    border-color: #007EEF;
    box-shadow: 0 0 0 3px rgba(0, 126, 239, 0.15);
}

.place-map-search-clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    padding: 4px;
}

.place-map-search-clear-btn:hover {
    color: #475569;
}

.place-map-search-submit-btn {
    height: 44px;
    padding: 0 20px;
    background: #007EEF;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Urbanist', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.place-map-search-submit-btn:hover {
    background: #0066cc;
}

.place-map-modal-map-view {
    height: 480px;
    width: 100%;
    background: #e2e8f0;
    position: relative;
}

@media (max-height: 800px) {
    .place-map-modal-map-view {
        height: 380px;
    }
}

.place-map-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fafafa;
}

.place-map-modal-selected-text {
    font-family: 'Urbanist', sans-serif;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.place-map-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.place-map-btn-secondary {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: 'Urbanist', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.place-map-btn-secondary:hover {
    background: #f8fafc;
}

.place-map-btn-primary {
    background: #007EEF;
    border: none;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 10px;
    font-family: 'Urbanist', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.place-map-btn-primary:hover {
    background: #0066cc;
}

/* Google Places Autocomplete Dropdown in Front of Modal */
.pac-container {
    z-index: 100000 !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22) !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 4px !important;
    font-family: 'Urbanist', sans-serif !important;
}

.pac-item {
    padding: 9px 14px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    border-top: 1px solid #f1f5f9 !important;
}

.pac-item:hover,
.pac-item-selected {
    background-color: #f0f7ff !important;
}

.pac-item-query {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

/* Common Alpine utility */
[x-cloak] {
    display: none !important;
}
