/* Base Styles */
@import 'base/reset.css';

/* Layout Styles */
@import 'layout/wrapper.css';
@import 'layout/header.css';
/* @import 'layout/footer.css'; - Inlined below for reliability */

/* Widget Styles */
/* @import 'widgets/map.css'; - Moved to bottom for reliability */
/* @import 'widgets/search-bar.css'; - Inlined below for reliability */

/* --- Flattened Search Bar Widget Styles (from widgets/search-bar.css) --- */
/* Floating Search Bar */
.search-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-overlay .menu-trigger {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 5px;
}

.search-overlay button#searchBtn {
    background: none;
    border: none;
    color: #007bff;
    font-weight: bold;
    cursor: pointer;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.page-header .back-btn {
    font-size: 1.2rem;
    color: #333;
    text-decoration: none;
}

.page-header .logo h1 {
    font-size: 1.2rem;
    margin: 0;
}

.page-header .logo a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

/* Page Content (Scrollable) */
main.page-content {
    flex: 1;
    height: auto; /* Override height: 100% from wrapper.css to allow flex to control size */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    background-color: #fff;
}

/* --- Sidebar Styles --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    background-color: #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 1.2rem;
    color: #fff;
}

.user-profile .user-info {
    flex: 1;
}

.user-profile .username {
    display: block;
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.user-profile .login-link {
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
}

.sidebar-actions {
    display: flex;
    gap: 10px;
}

.sidebar-actions .icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
}

.register-car-link {
    display: block;
    color: #666;
    text-decoration: underline;
    font-size: 0.9rem;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

.action-buttons {
    display: block;
    height: auto;
}

.primary-btn {
    width: 100%;
    height: auto;
    padding: 15px;
    background-color: #eef4ff;
    border: 1px solid #dceeff;
    border-radius: 8px;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: block;
    text-align: center;
}

.secondary-actions {
    display: flex;
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    border: 1px solid #eee;
}

.secondary-actions button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: relative;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: normal;
}

.secondary-actions button span {
    text-orientation: mixed;
}

.secondary-actions button:first-child::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 15px;
    background-color: #ddd;
    display: block;
}

.secondary-actions button:first-child {
    border-right: none;
    border-left: none;
}

.stats-list {
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 1rem;
    color: #333;
}

.stat-item .value {
    font-weight: bold;
}

.menu-list a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 1px solid #f5f5f5;
}

.menu-list a:last-child {
    border-bottom: none;
}

.menu-list .badge {
    background-color: #007bff;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.sidebar-footer {
    padding: 20px;
    background-color: #f8f9fa;
}

.sidebar-banner {
    background-color: #eef4ff;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #007bff;
    font-weight: bold;
}

/* --- Flattened Footer Styles (from layout/footer.css) --- */
/* Footer (Navigation Bar) */
footer {
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 10px 0;
    flex-shrink: 0;
    z-index: 100;
}

footer nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
    padding: 0;
    margin: 0;
}

footer nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
    text-decoration: none;
}

footer nav a.active {
    color: #007bff;
}

footer nav a span {
    margin-top: 4px;
}

/* Bottom Banner */
.bottom-banner {
    background-color: #eef4ff;
    padding: 15px 20px 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bottom-banner .banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 10px;
    z-index: 1;
}

.bottom-banner .ad-badge {
    background-color: #fff;
    color: #999;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1;
}

.bottom-banner .banner-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}

.bottom-banner .banner-title i {
    font-size: 0.8rem;
    color: #333;
}

.bottom-banner .banner-desc {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.3;
}

.bottom-banner .banner-image {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
}

.bottom-banner .close-btn {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding-bottom: 3px;
    z-index: 10;
}

.bottom-banner .ad-info {
    position: absolute;
    bottom: 8px;
    right: 15px;
    font-size: 0.6rem;
    color: #aaa;
    background-color: rgba(255,255,255,0.7);
    padding: 2px 6px;
    border-radius: 4px;
}
/* ------------------------------------------------------- */
/* @import 'widgets/bottom-sheet.css'; - Inlined below for reliability */

/* My Location Button */
.my-location-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 15; /* Above map (0), below bottom sheet (20) */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #333;
    transition: background-color 0.2s;
}

.my-location-btn:active {
    background-color: #f0f0f0;
}

/* --- Flattened Bottom Sheet Widget Styles (from widgets/bottom-sheet.css) --- */
/* Bottom Sheet (Parking Info) */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 20;
    height: calc(100% - 60px); /* Prevent overlapping with header */
    transform: translateY(100%); /* Hidden by default */
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    will-change: transform;
}

@media (max-width: 480px) {
    .bottom-sheet {
        height: calc(100% - 60px); /* Mobile specific height */
        max-height: 85vh; /* Optional: limit max height if needed */
    }
}

/* Peek State (Active) */
.bottom-sheet.active {
    transform: translateY(calc(100% - 180px)); /* Show only top 180px */
}

/* Expanded State */
.bottom-sheet.expanded {
    transform: translateY(0); /* Show full height */
}

/* Handle Bar for Dragging */
.sheet-handle-bar {
    width: 100%;
    height: 30px; /* Touch area height */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
    background-color: transparent;
    margin-top: 5px;
}

.sheet-handle-bar::after {
    content: '';
    width: 40px;
    height: 5px;
    background-color: #ddd;
    border-radius: 5px;
}

/* Peek Section */
.sheet-peek {
    padding: 0 20px 10px;
    flex-shrink: 0;
    cursor: grab;
    touch-action: none; /* Prevent browser scroll to allow sheet dragging */
}

.sheet-peek h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #333;
}

.sheet-peek .peek-info {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sheet-peek .separator {
    color: #ddd;
}

.sheet-peek .peek-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
}

.sheet-peek .peek-price .label {
    font-size: 0.9rem;
    color: #555;
}

.sheet-peek .peek-price .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #007bff;
}

/* Scrollable Content Area */
.sheet-content {
    overflow-y: auto;
    padding: 0 20px 20px;
    flex: 1;
    /* Hide content in peek mode */
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.bottom-sheet.expanded .sheet-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mini Map */
.mini-map-placeholder {
    width: 100%;
    height: 150px;
    background-color: #eee;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    margin-bottom: 15px;
}

/* Divider */
.divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

/* Detail List */
.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.detail-item .label {
    color: #666;
    font-weight: bold;
}

.detail-item .value {
    text-align: right;
    color: #333;
}

.address-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: space-around;
}

.action-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #333;
}

.action-btn .icon {
    font-size: 1.5rem;
    background: #f8f9fa;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-btn .text {
    font-size: 0.8rem;
}

/* Ads */
.small-ad-banner, .big-ad-banner {
    background-color: #f1f3f5;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
}

.big-ad-banner {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Section Titles */
.section h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
}

/* Recommendations Scroll */
.recommendation-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.rec-card {
    min-width: 120px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.rec-img {
    height: 80px;
    background-color: #ddd;
}

.rec-title {
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.photo-item {
    height: 100px;
    background-color: #ddd;
    border-radius: 8px;
}

/* Tables */
.rate-table, .hours-table {
    font-size: 0.9rem;
}

.rate-row, .hours-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f8f9fa;
}

/* Disclaimer */
.disclaimer {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #856404;
    margin-bottom: 20px;
}

.disclaimer .desc {
    margin-top: 5px;
    font-size: 0.75rem;
}

/* Footer Button */
.sheet-footer .btn {
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
/* --------------------------------------------------------- */

/* Critical Fallback Styles (In case imports fail or delay) */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
#app-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
    position: relative;
}
#map {
    width: 100%;
    height: 100%;
}

/* --- Flattened Map Widget Styles (from widgets/map.css) --- */
/* Map Widget */
#map {
    width: 100%;
    height: 100%;
    background-color: #e9ecef; /* 지도 로딩 전 배경색 */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Custom Overlay (Speech Bubble) */
.custom-overlay {
    position: relative;
    bottom: 50px;
    background: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 150px;
    cursor: pointer;
    border: 1px solid #ddd;
    color: #333; /* Ensure text color */
}

.custom-overlay::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    z-index: 1;
}

.custom-overlay::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #ddd transparent transparent transparent;
    z-index: 0;
}

.custom-overlay .title {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #333;
    display: block;
}

.custom-overlay .info {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    justify-content: center;
    gap: 5px;
    align-items: center;
}

.custom-overlay .badge {
    background-color: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #495057;
}

.custom-overlay .price {
    color: #007bff;
    font-weight: bold;
}
/* --------------------------------------------------------- */

/* Slider Container - Masks the scrollbar */
.slider-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

/* Image Slider Styles */
.image-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 0;
    width: 100%;
    height: 230px; /* Taller to push scrollbar out of view */
    padding-bottom: 30px;
    align-items: flex-start;
    cursor: grab;
    
    /* Hide scrollbar consistently */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.image-slider:active {
    cursor: grabbing;
}

.image-slider img {
    scroll-snap-align: start;
    flex: 0 0 100%;
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.image-slider::-webkit-scrollbar {
  display: none;
  width: 0 !important;
  height: 0 !important;
  background: transparent;
}


/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
    pointer-events: none; /* Let clicks pass through to image if needed */
}

.slider-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

