/* ---------------------------------
   DUCKCITY EXPANSION STYLES
--------------------------------- */

/* Map Dropdown Styles (Applied to Index Page initially, reused implicitly)
   These styles ensure the dropdown structurally matches the original h1
   while adding standard dropdown hover/click functionality. 
*/
#title-dropdown-container {
    position: relative;
    display: flex;
    justify-content: center;
    grid-column: 2;
    z-index: 1000;
}

#site-main-title {
    /* Base styles inherit from game-base.css h1, but we add cursor */
    cursor: default; /* Changed from pointer to default initially, JS toggles it */
    user-select: none;
    margin: 0;
    transition: color 0.2s, text-shadow 0.2s;
}

/* The main-page title always acts like the map trigger. */
#title-dropdown-container.is-interactive #site-main-title {
    cursor: pointer;
}

#title-dropdown-container.is-interactive #site-main-title:hover {
    color: #ffd700;
}

#map-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    margin-top: 18px;
    background-color: #222;
    border: 4px solid #000;
    box-shadow: 
        inset 4px 4px 0px #555, 
        inset -4px -4px 0px #111,
        6px 6px 0px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    min-width: 14rem;
    z-index: 1001;
    image-rendering: pixelated;
    
    /* ANIMATION BASE: Closed */
    transform: translateX(-50%) scaleX(0);
    transform-origin: top center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    
    /* Exit animation: Fast, direct fold-away (No bounce/expansion) */
    transition: 
        transform 0.1s ease-in, 
        opacity 0.1s, 
        visibility 0s 0.1s;
}

#map-dropdown-menu.is-open {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    
    /* Entrance animation: Snappy pop (Expands slightly past 1) */
    transition: 
        transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.25), 
        opacity 0.1s, 
        visibility 0s;
}

/* Pixel-style arrow (The Beak) */
#map-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #000;
}

#map-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #222;
}

.map-dropdown-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #fff;
    background: transparent;
    border: none;
    padding: 20px 24px;
    text-align: left;
    cursor: pointer;
    text-shadow: 2px 2px #000;
    border-bottom: 4px solid #111;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    transition: all 0.1s;
}

.map-dropdown-btn:last-child {
    border-bottom: none;
}

.map-dropdown-note {
    padding: 16px 18px 18px;
    border-top: 4px solid #111;
    background: linear-gradient(180deg, rgba(34, 34, 34, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
}

.map-dropdown-note-text {
    margin: 0 0 14px;
    font-size: 11px;
    line-height: 1.6;
    color: #fff4b5;
    text-shadow: 2px 2px #000;
}

.map-dropdown-cta {
    width: 100%;
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: #fff;
    background: #8b5a14;
    border-style: outset;
    border-width: 4px;
    border-color: #e1af4a #5f3a00 #5f3a00 #e1af4a;
    padding: 12px 14px;
    cursor: pointer;
    text-shadow: 2px 2px #000;
}

.map-dropdown-cta:hover {
    background: #a96e17;
}

.map-dropdown-cta:active {
    border-style: inset;
    transform: scale(0.99);
}

.map-dropdown-btn .map-mini-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    object-fit: contain;
}

/* STREET THEME */
.map-dropdown-btn[data-map="street"]:hover {
    background-color: #444;
    color: #fff;
}
.map-dropdown-btn[data-map="street"].active {
    border-left: 6px solid #ffd700;
    padding-left: 18px;
}

/* CITY THEME */
.map-dropdown-btn[data-map="city"]:hover {
    background-color: #444;
    color: #fff;
}
.map-dropdown-btn[data-map="city"].active {
    border-left: 6px solid #00ff00;
    padding-left: 18px;
}

.map-dropdown-btn:active {
    transform: scale(0.98);
    background-color: #111;
}

/* ---------------------------------
   DUCKCITY MAP ACTIVE OVERRIDES 
--------------------------------- */
/* When the active map is "city", the body tag gets a .map-city class */

body.map-city {
    background-color: #1a1a2e; /* Darker, city night fallback */
}

body.map-city #street-background-layer {
    /* Override standard background with city background */
    background-image: url('../duckcity/images/duckcitybackground.png') !important;
}


/* City Item Shop Cards Borders */
.item-shop-card[data-map="city"] {
    border-color: #ff3366 !important; /* Neon pink for city items */
    box-shadow: 0 0 5px rgba(255, 51, 102, 0.5);
}

/* Taxi Ticket Shop Visuals */
#buy-duckcity-ticket .pack-card-front,
#buy-duckcity-ticket .pack-card-back {
    border-color: #ff3366; /* Neon city pink */
    background: linear-gradient(135deg, #222 0%, #3a1c28 100%);
}

#buy-duckcity-ticket-btn {
    background-color: #8b0000;
    border-color: #ff3366 #4d0000 #4d0000 #ff3366;
}

#buy-duckcity-ticket-btn:active {
    border-color: #4d0000 #ff3366 #ff3366 #4d0000;
}
