/**
 * Dynamic Google Maps – Styles  v1.2.0
 * File: assets/dynamic-map.css
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.dgm-map-wrapper {
    position:      relative;
    width:         100%;
    border-radius: 12px;
    overflow:      hidden;
    box-shadow:    0 4px 24px rgba(0, 0, 0, 0.12);
}

/* FORCE layout override */
.dgm-map-layout {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    width: 100%;
    height: 500px;
}

#dgm-map {
    width:   100%;
    /* height:  500px; */
    display: block;
}

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.dgm-loading {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             10px;
    background:      rgba(255, 255, 255, 0.85);
    font-size:       15px;
    color:           #555;
    backdrop-filter: blur(4px);
    z-index:         10;
    pointer-events:  none;
}
.dgm-spinner {
    display:          inline-block;
    width:            22px;
    height:           22px;
    border:           3px solid #e0e0e0;
    border-top-color: #e53935;
    border-radius:    50%;
    animation:        dgm-spin 0.7s linear infinite;
}
@keyframes dgm-spin { to { transform: rotate(360deg); } }


/* ── Strip Google's default InfoWindow padding ───────────────────────────── */
.gm-style .gm-style-iw-c {
    border-radius: 12px !important;
    padding:       0    !important;
    box-shadow:    0 8px 32px rgba(0, 0, 0, 0.22) !important;
    overflow:      hidden !important;
    max-width:     260px !important;
}
.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding:  0      !important;
    max-height: none !important;
}
/* Close button */
.gm-style .gm-style-iw-chr {
    position: absolute;
    top:      4px;
    right:    4px;
    z-index:  10;
}
.gm-style .gm-style-iw-chr button {
    background: rgba(255,255,255,0.85) !important;
    border-radius: 50% !important;
    width:  28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2) !important;
}


/* ── InfoWindow card ─────────────────────────────────────────────────────── */
.dgm-card {
    width:       260px;
    font-family: 'Google Sans', Roboto, Arial, sans-serif;
    background:  #fff;
    border-radius: 12px;
    overflow:    hidden;
}

/* Loading state */
.dgm-card--loading {
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    padding:         32px 20px;
    gap:             12px;
}
.dgm-card__spinner {
    width:            28px;
    height:           28px;
    border:           3px solid #e0e0e0;
    border-top-color: #1a73e8;
    border-radius:    50%;
    animation:        dgm-spin 0.7s linear infinite;
}
.dgm-card__loading-text {
    margin:    0;
    font-size: 13px;
    color:     #777;
}

/* Photo hero — matches the dark image header in Google My Maps */
.dgm-card__photo {
    width:               100%;
    height:              160px;
    background-color:    #3a3a3a;
    background-size:     cover;
    background-position: center;
    background-repeat:   no-repeat;
}
.dgm-card__photo--placeholder {
    display:         flex;
    align-items:     center;
    justify-content: center;
    background:      linear-gradient(160deg, #3d3d3d, #1e1e1e);
}
.dgm-card__photo--placeholder svg {
    width:  52px;
    height: 52px;
}

/* Body */
.dgm-card__body {
    padding: 14px 16px 16px;
}

/* Location name */
.dgm-card__name {
    margin:      0 0 6px;
    font-size:   16px;
    font-weight: 600;
    color:       #202124;
    line-height: 1.3;
}

/* Star rating row */
.dgm-card__rating {
    display:     flex;
    align-items: center;
    gap:         4px;
    margin:      0 0 8px;
}
.dgm-card__rating-score {
    font-size:   13px;
    font-weight: 700;
    color:       #e37400;
    line-height: 1;
}
.dgm-card__stars {
    display:     flex;
    align-items: center;
    gap:         1px;
}
.dgm-star {
    width:  14px;
    height: 14px;
    fill:   #e37400;
}
.dgm-star--empty {
    fill: #dadce0;
}
.dgm-card__rating-count {
    font-size: 12px;
    color:     #70757a;
}

/* Address */
.dgm-card__address {
    margin:      0 0 12px;
    font-size:   13px;
    color:       #444;
    line-height: 1.5;
}

/* "View in Google Maps" link — matches the blue link in reference screenshot */
.dgm-card__gmaps-link {
    display:         inline-flex;
    align-items:     center;
    gap:             5px;
    font-size:       13px;
    font-weight:     500;
    color:           #1a73e8;
    text-decoration: none;
    transition:      color 0.15s;
}
.dgm-card__gmaps-link:hover {
    color:           #1558b0;
    text-decoration: underline;
}
.dgm-card__gmaps-link svg {
    flex-shrink: 0;
    fill:        currentColor;
}
/* Layout */
.dgm-map-wrapper
{
  display: flex;
  height: 100%;
  background: #f5f5f5;
  flex-wrap: wrap;
}

/* Sidebar */
.dgm-sidebar
{
  width: 320px;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
}

/* Header */
.dgm-header
{
  background: #2e3131;
  color: #fff;
  padding: 12px 16px;
}

.dgm-title-wrap
{
  display: flex;
  align-items: center;
  gap: 10px;
}

.dgm-avatar
{
  width: 36px;
  height: 36px;
  background: #1e8e3e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.dgm-title
{
  font-size: 14px;
  font-weight: 500;
}

.dgm-subtitle
{
  font-size: 12px;
  opacity: 0.8;
}

/* Meta */
.dgm-meta
{
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  color: #5f6368;
}

.dgm-views
{
  margin-bottom: 4px;
}

/* List */
.dgm-list
{
  overflow-y: auto;
  flex: 1;
}

/* Group */
.dgm-list-group
{
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

/* Checkbox + Title */
.dgm-group-title
{
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

/* Red checkbox indicator */
.dgm-list-group.active .dgm-group-title::before
{
  content: "✔";
  font-size: 12px;
  color: #fff;
  background: #d93025;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

/* Items */
.dgm-list-item
{
  font-size: 13px;
  color: #202124;
  padding: 6px 16px 6px 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Orange bullet */
.dgm-list-item::before
{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Hover */
.dgm-list-item:hover
{
  background: #f1f3f4;
}

/* Map */
#dgm-map {
    flex: 1 !important;
    min-height: 350px;
}
/* ── Responsive ──────────────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    /* #dgm-map { height: 350px !important; } */
    .dgm-card { width: 260px; }
    .dgm-card__photo { height: 130px; }
    .dgm-map-wrapper #dgm-sidebar {
        flex: 100% !important;
        width: 100% !important;}
        .dgm-map-wrapper #dgm-map {
            flex: auto !important;}
}

/* ── My Maps Style Layout ───────────────────────────────── */
.dgm-map-layout {
    display: flex;
    width: 100%;
    height: 500px;
}

/* Sidebar */
#dgm-sidebar {
    flex: 0 0 320px !important;
    width: 320px !important;
    background: #fff;
    border-right: 1px solid #ddd;
}

/* Map container MUST have explicit height */
#dgm-map {
    flex: 1!important;
    /* height: 500px!important; */
}

.dgm-list-item.active {
    background: #e8f0fe;
    font-weight: 600;
}

/* Sidebar split */
#dgm-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* List (scrollable) */
#dgm-sidebar-list {
    flex: 1;
    overflow-y: auto;
    border-bottom: 1px solid #eee;
}

/* Detail (fixed bottom) */
#dgm-sidebar-detail {
    padding: 12px;
    background: #fafafa;
}

/* Detail card styling */
.dgm-detail {
    font-family: Roboto, Arial, sans-serif;
}

.dgm-detail h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #202124;
}

.dgm-detail p {
    margin: 0 0 10px;
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}

.dgm-detail a {
    font-size: 13px;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.dgm-detail a:hover {
    text-decoration: underline;
}

/* Detail image */
.dgm-detail-photo {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Detail body */
.dgm-detail-body {
    padding: 4px 2px;
}