* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global scrollbar styling for WebKit browsers (Chrome, Edge, Safari) */
html {
    /* Width of the vertical scrollbar */
    scrollbar-width: thin;
}

body {
    font-family: "Plus Jakarta Sans", serif;
    background-color: #fff;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
}

.navbar {
    height: 5rem;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent background */
    backdrop-filter: blur(15px); /* Glassmorphism effect */
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.branding {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-size: 2rem;
    margin: 0 0.5rem;
    font-family: "Jost", "Sans-serif";
    color: #fe424d;
    font-weight: 700;
}

.fa-airbnb {
    color: #fe424d;
    font-size: 2rem;
    font-weight: 700;
}

.f-info {
    display: flex;
    flex-direction: column;
    background-color: #ebebeb;
}

.f-info-links a,
.nav-links a {
    text-decoration: none;
    color: #222222;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.f-info-links a:hover,
.nav-links a:hover {
    text-decoration: underline;
}

.upper-nav {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: left;
    padding: 1rem;
    gap: 6rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    margin: 2rem 5rem;
}

.lower-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-top: 1px solid #ccc;
}

.f-info-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
}

.f-info-links a {
    font-weight: 500;
}

.f-info-brand {
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #555;
}

.f-info-socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    font-size: 0.9rem;
}

/* Base styles for all spans (language, currency, social icons) */
.f-info-socials span {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Language and Currency styles */
.lang,
.currency {
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    background-color: transparent;
}

.lang:hover,
.currency:hover {
    background-color: #f7f7f7;
}

/* Text inside language and currency rises on hover */
.lang .lang-text strong,
.currency strong {
    display: inline-block;
    transition: transform 0.2s ease;
}

.lang:hover .lang-text strong,
.currency:hover strong {
    transform: translateY(-2px);
}

/* Language icon */
.lang-icon i {
    font-size: 1rem;
    color: #222;
}

.fa-brands {
    border: none;
    padding: 0.4rem;
}

.f-info-socials i {
    font-size: 1rem;
    color: #222;
    justify-content: center;
    align-items: center;
}

.lang-text strong,
.currency strong {
    font-weight: 600;
    color: #222;
}

.idx-heading {
    margin-top: 2rem;
}

.listing-card {
    border: none !important;
    margin-bottom: 2rem;
}

.card-img-top {
    border-radius: 1rem !important;
    width: 100% !important;
    object-fit: cover !important;
    height: 20rem;
}

.card-body {
    padding: 0 !important;
}

.card-body p {
    font-weight: 400;
}

.card-text {
    color: #000;
}

.rvw-cmt {
    color: rgba(0, 0, 0, 0.7);
}

.listing-link {
    text-decoration: none;
}

.card-img-overlay {
    opacity: 0;
}

.card-img-overlay:hover {
    opacity: 0.5;
    background-color: #ffffff;
}

.add-btn,
.edit-btn {
    background-color: #fe424d;
    border: none;
    color: white;
    transition: background 0.3s ease-in-out;
}

.add-btn:hover,
.edit-btn:hover {
    background-color: #d83a42;
}

.full-space {
    margin-top: 2rem;
}

.show-img {
    height: 40vh;
}

.btns {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 2rem;
}

.btn-dark {
    background-color: #333;
    transition: background 0.3s ease-in-out;
}

.btn-dark:hover {
    background-color: #000;
}

.btn-danger {
    background-color: #d9534f;
    transition: background 0.3s ease-in-out;
}

.btn-danger:hover {
    background-color: #c9302c;
}

.edit-delete-btn {
    width: auto;
    margin-top: 0.5rem;
    margin-bottom: 5rem;
}

.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 250px;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.3s ease-in-out;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

.flash-hide {
    opacity: 0;
    transform: translateY(-20px);
}

#map {
    width: 100%;
    max-width: 800px;
    height: 450px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 1rem auto;
    background-color: #f9f9f9;
    overflow: hidden;
}

.map-warn {
    font-size: 0.9rem;
    margin-top: 0;
    top: 0;
}

.marker-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-circle {
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: rgba(231, 79, 8, 0.2);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.marker {
    width: 40px;
    height: 40px;
    perspective: 600px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.marker .front,
.marker .back {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    backface-visibility: hidden;
    transition: transform 0.4s ease-in-out;
}

.marker .front {
    background-image: url("home.png");
    transform: rotateY(0deg);
    z-index: 2;
}

.marker .back {
    background-image: url("airbnb.png");
    transform: rotateY(180deg);
}

.marker:hover .front {
    transform: rotateY(180deg);
}

.marker:hover .back {
    transform: rotateY(360deg);
}

.mapboxgl-popup-content {
    font-family: "Segoe UI", sans-serif;
    padding: 5px 5px;
    background-color: #fff;
    border-radius: 8px;
}

.mapboxgl-popup-tip {
    border-top-color: #fff;
}

#filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.75rem 0;
    margin-top: 1.5rem;
    border-bottom: 1px solid #eee;
}

/* Filters container with edge fade gradients */
.filters-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.filters-container::before,
.filters-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3rem;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filters-container::before {
    left: 0;
    background: linear-gradient(to right, #fff 20%, transparent);
}

.filters-container::after {
    right: 0;
    background: linear-gradient(to left, #fff 20%, transparent);
}

#filters {
    padding: 0.5rem 2rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#filters:active {
    cursor: grabbing;
}

#filters::-webkit-scrollbar {
    display: none;
}

.filter {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #717171;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter i {
    font-size: 1.35rem;
    transition: transform 0.2s ease;
}

.filter p {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.filter:hover {
    color: #222;
    border-bottom-color: #ddd;
}

.filter:hover i {
    transform: scale(1.1);
}

.filter.active {
    color: #222;
    border-bottom-color: #222;
    font-weight: 600;
}

.filter.active i {
    transform: scale(1.1);
}

/* --- Floating Tax Toggle (bottom right) --- */
.tax-toggle-floating {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(34, 34, 34, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 50px;
    color: #fafafa;
    font-size: 0.82rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tax-toggle-floating:hover {
    background: rgba(34, 34, 34, 0.95);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.tax-toggle-floating .form-check-label {
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.form-check-input,
.form-check-label {
    cursor: pointer;
}

/* Keep old .tax-toggle hidden (not used anymore) */
.tax-toggle {
    display: none;
}

.form-check-input:checked {
    background-color: #fe424d;
    color: #fafafa;
    border-color: #fafafa;
}

.price-after {
    display: none;
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.tag {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: #ffc107;
    color: #000;
    border-radius: 20px;
    padding: 5px 10px;
    margin: 2px;
    font-size: 14px;
}

.tag .remove-tag {
    cursor: pointer;
    margin-left: 8px;
    font-weight: bold;
    line-height: 1;
}

.custom-search-form {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-search-form:focus-within .search-container {
    width: 30rem;
}

.search-container {
    position: relative;
    width: 20rem;
    transition: width 0.4s ease;
}

.custom-search-input::placeholder {
    color: #888;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-search-input {
    width: 100%;
    padding: 10px 55px 10px 20px;
    border-radius: 50px;
    border: 2px solid #333;
    outline: none;
    font-size: 1rem;
    background-color: #fff;
}

.custom-search-input:focus {
    box-shadow: 0 0 10px rgba(254, 66, 77, 0.4);
    border-color: #fe424d;
}

.custom-search-button {
    position: absolute;
    top: 5px;
    right: 5px;
    bottom: 5px;
    padding: 0 15px;
    background-color: #fe424d;
    border: none;
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.custom-search-button:hover {
    background-color: #000;
    color: #fafafa;
}

.custom-search-button .btn-text {
    transition: opacity 0.3s ease;
}

/* ========================================================================
   RESPONSIVE MEDIA QUERIES
   ======================================================================== */

/* ---------- 1200px and below (Standard laptops) ---------- */
@media (max-width: 1200px) {
    .search-container {
        width: 16rem;
    }

    .custom-search-form:focus-within .search-container {
        width: 24rem;
    }

}

/* ---------- 992px and below (Tablets / small laptops) ---------- */
@media (max-width: 992px) {
    /* --- Navbar --- */
    .navbar {
        height: auto;
        padding: 0.5rem 0;
    }

    .fa-airbnb {
        font-size: 1.6rem;
    }

    .search-container {
        width: 14rem;
    }

    .custom-search-form:focus-within .search-container {
        width: 20rem;
    }

    /* When navbar collapses, give spacing to items inside */
    .collapse.navbar-collapse {
        padding: 0.5rem 0;
    }

    .collapse.navbar-collapse .navbar-nav {
        padding: 0.25rem 0;
    }

    /* --- Filter bar --- */
    #filter-wrapper {
        padding: 0.5rem 0;
    }

    /* --- Card images --- */
    .card-img-top {
        height: 18rem;
    }

    /* --- Show page --- */
    .show-img {
        height: 35vh;
    }

    #map {
        height: 350px;
    }

    /* --- Footer --- */
    .upper-nav {
        gap: 2rem;
        padding: 1rem;
        flex-wrap: wrap;
    }

    .nav-links {
        margin: 1rem 2rem;
    }

    /* --- Flash messages --- */
    .flash-message {
        right: 15px;
        left: 15px;
        max-width: none;
        min-width: unset;
    }
}

/* ---------- 768px and below (Large phones / small tablets) ---------- */
@media (max-width: 768px) {
    /* --- Navbar --- */
    .brand-name {
        font-size: 1.5rem;
    }

    .fa-airbnb {
        font-size: 1.5rem;
    }

    /* Search bar: narrower, hide button text, show icon */
    .search-container {
        width: 100%;
        max-width: 100%;
    }

    .custom-search-form {
        width: 100%;
        padding: 0 0.5rem;
    }

    .custom-search-form:focus-within .search-container {
        width: 100%;
    }

    .custom-search-input {
        padding: 8px 50px 8px 16px;
        font-size: 0.9rem;
    }

    .custom-search-button {
        padding: 0 12px;
        font-size: 0.85rem;
    }

    /* Navbar collapsed items center-aligned */
    .collapse.navbar-collapse .navbar-nav {
        align-items: flex-start;
        padding: 0.5rem 1rem;
    }

    /* --- Filter bar --- */
    #filters {
        padding: 0.5rem 1rem;
        gap: 0.4rem;
    }

    .filter {
        padding: 0.4rem 0.75rem;
    }

    .filter i {
        font-size: 1.1rem;
    }

    .filter p {
        font-size: 0.65rem;
    }

    .tax-toggle-floating {
        bottom: 1rem;
        right: 1rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }

    .tax-toggle-floating .form-check-label {
        font-size: 0.72rem;
    }

    /* --- Card images --- */
    .card-img-top {
        height: 15rem;
    }

    /* --- Show page --- */
    .show-img {
        height: 30vh;
        min-height: 180px;
    }

    .edit-delete-btn {
        margin-bottom: 3rem;
    }

    #map {
        height: 280px;
    }

    /* --- Footer --- */
    .upper-nav {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .nav-links {
        margin: 1rem 1.5rem;
    }

    .lower-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .f-info-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .f-info-socials {
        justify-content: center;
    }

    /* --- Forms general --- */
    .full-space {
        margin-top: 1rem;
    }
}

/* ---------- 480px and below (Small phones) ---------- */
@media (max-width: 480px) {
    /* --- Navbar --- */
    .navbar {
        padding: 0.3rem 0;
    }

    .brand-name {
        font-size: 1.4rem;
    }

    .fa-airbnb {
        font-size: 1.4rem;
    }

    /* --- Search bar --- */
    .custom-search-input {
        padding: 7px 45px 7px 14px;
        font-size: 0.85rem;
    }

    .custom-search-button {
        padding: 0 10px;
        font-size: 0.8rem;
    }

    /* --- Filters --- */
    #filter-wrapper {
        padding: 0.4rem 0;
    }

    #filters {
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
    }

    .filter {
        padding: 0.3rem 0.6rem;
    }

    .filter p {
        font-size: 0.6rem;
    }

    .filter i {
        font-size: 1rem;
    }

    .tax-toggle-floating {
        bottom: 0.75rem;
        right: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    .tax-toggle-floating .form-check-label {
        font-size: 0.68rem;
    }

    /* --- Cards --- */
    .card-img-top {
        height: 12rem;
    }

    .listing-card {
        margin-bottom: 1rem;
    }

    /* --- Show page --- */
    .show-img {
        height: 25vh;
        min-height: 150px;
    }

    #map {
        height: 220px;
        max-width: 100%;
    }

    .map-warn {
        font-size: 0.78rem;
    }

    .edit-delete-btn {
        margin-bottom: 2rem;
    }

    .btns {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* --- Footer --- */
    .nav-links {
        margin: 0.75rem 1rem;
    }

    .nav-links h6 {
        font-size: 0.85rem;
    }

    .f-info-links a,
    .nav-links a {
        font-size: 0.8rem;
    }

    .lower-nav {
        padding: 0.75rem;
    }

    .lang,
    .currency {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    /* --- Flash messages --- */
    .flash-message {
        top: 10px;
        right: 10px;
        left: 10px;
        font-size: 0.85rem;
        padding: 10px 15px;
    }

    /* --- Category tags --- */
    .tag {
        font-size: 12px;
        padding: 3px 8px;
    }
}
