/* GLOBAL */
body {
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
}

/* HEADER */
#header {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 800;
    letter-spacing: 1px;
    color:#ffffff;
    height: 60px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    width: 100%;
}

.header-left,
.header-right {
    width: 33%;
    text-align: center;
}

.header-center {
    width: 33%;
    display: flex;
    justify-content: center;
}

/* MAP */
#map {
    height: calc(100vh - 60px);
    width: 100%;
        position: relative;
    z-index: 1;
    pointer-events: none; /* allows touches to pass through */
}

/* SLIDE-OUT VOTE PANEL */
#voteToggle {
    position: absolute;
    top: 12vh;
    left: 0;
    background: #ff6600;
    color: #fff;
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 13px;
    z-index: 20;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

#votePanel {
    font-size:13px;
    position: absolute;
    top: 18vh;
    left: -300px;
    width: 280px;
    height: 40vh;
    background: #ffffffee;
    padding: 12px;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    transition: left 0.35s ease;
    z-index: 15;
    overflow-y: auto;
}

#votePanel.open {
    left: 0;
}

.next-item {
    margin-bottom: 10px;
    padding: 10px;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e6e6e6;
}

/* POPUP (Mapbox popup) */
.mapboxgl-popup-content {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.popup-container {
    max-width: 360px;
    position: relative;
}

.popup-carousel .carousel-item img.popup-img {
    height: 220px;
    object-fit: cover;
    width: 100%;
}

.popup-text {
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    margin-top: 12px;
}

.popup-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.popup-text p {
    margin: 8px 0;
    line-height: 1.4;
}

.tiktok-btn {
    width: 100%;
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
}

/* COOLDOWN POPUP */
.cooldown-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cooldown-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    width: 300px;
    animation: popIn 0.3s ease-out;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Floating email signup button */
#emailSignupBtn {
        cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
       position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ff6600;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 99999; /* increase */
    pointer-events: auto; /* force Safari to allow touch */
    -webkit-transform: translateZ(0); /* Safari fix */
}

/* Popout panel */
#emailSignupPopout {
    position: fixed;
    bottom: -500px;
    right: 20px;
    width: 260px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    padding: 20px;
    z-index: -1;

    /* NEW ANIMATION */
    opacity: 0;
    transform: translateY(20px);
    transition:
        bottom 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

#emailSignupPopout.open {
    bottom: 20px;
    opacity: 1;
    transform: translateY(0);
}




/* Popout content */
#emailSignupPopout h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

#emailSignupPopout p {
    font-size: 14px;
    margin: 0 0 12px;
}

#emailSignupPopout input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 12px;
}

#emailSignupPopout button {
    width: 100%;
    padding: 10px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Close button */
#notifyClose {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}

/* Toast container */
#toastContainer {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toast box */
.toast {
    background: #222;
    color: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    min-width: 220px;
    max-width: 300px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Toast visible */
.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Toast success */
.toast.success {
    background: #28a745;
}

/* Toast error */
.toast.error {
    background: #dc3545;
}

/* Close button */
.toast .close {
    margin-left: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}
/* Input spacing */
.input-group {
    margin-bottom: 16px;
}

/* GDPR section — simplified and stable */
.gdpr-wrap {
    margin: 12px 0 16px;
}

.gdpr-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    color: #333;
}

.gdpr-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.gdpr-label span {
    display: block;
}

/* Duplicate email status */
.email-status {
    margin-top: -2px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #e74c3c;
}

/* Notify button spacing */
.notify-btn {
    margin-top: 6px;
}
/* iPhone Safari text alignment fixes */
#emailSignupPopout .popout-content {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    position: relative;
    padding-bottom: 24px;
}

#emailSignupPopout input,
#emailSignupPopout button,
#emailSignupPopout label,
#emailSignupPopout p,
#emailSignupPopout h3 {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

#emailSignupPopout input {
    font-size: 16px; /* prevents iOS zoom + misalignment */
}

.gdpr-label span {
    display: inline-block;
    line-height: 1.4;
}
