/* ==============================================
   INFO MODAL — Restaurant Profile
   ============================================== */

/* ── Variables ── */
:root {
    --gold:        #d4a574;
    --gold-dark:   #c4956f;
    --gold-soft:   rgba(212, 165, 116, 0.10);
    --gold-border: rgba(212, 165, 116, 0.22);
    --gold-grad:   linear-gradient(135deg, #d4a574, #c4956f);

    --bg:      #ffffff;
    --surface: #f7f8fa;
    --border:  #e8eaed;
    --text:    #0f172a;
    --sub:     #64748b;
    --muted:   #94a3b8;

    --shadow: 0 0 0 1px rgba(0, 0, 0, 0.04),
              0 20px 60px rgba(0, 0, 0, 0.11),
              0 6px 20px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }


/* ── Overlay ── */
.info-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    animation: overlay-in 0.2s ease;
}
.info-modal-overlay.active { display: flex; }

@keyframes overlay-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* ── Modal Shell ── */
.info-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    animation: modal-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}


/* ── Floating Buttons (Close & Share) ── */
.info-modal-close,
.info-hero-share-btn {
    position: absolute;
    z-index: 40;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    transition: background 0.15s, transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.info-modal-close          { top: 18px; right: 16px; }
.info-modal-hero-actions   { position: absolute; top: 18px; left: 16px; z-index: 20; }
.info-hero-share-btn       { position: relative; }

.info-modal-close:hover,
.info-hero-share-btn:hover  { background: #ffffff; transform: scale(1.1); }

.info-modal-close:active,
.info-hero-share-btn:active { transform: scale(0.92); }

.info-modal-close svg,
.info-hero-share-btn svg {
    display: block;
    width: 15px;
    height: 15px;
    color: var(--text);
    stroke-width: 2.2;
}


/* ── Hero Image ── */
.info-modal-hero {
    position: relative;
    height: 270px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--surface);
}
.info-modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.info-modal-hero:hover img { transform: scale(1.04); }

.info-modal-hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.04) 0%,
        transparent 30%,
        transparent 52%,
        rgba(0, 0, 0, 0.34) 100%
    );
}


/* ── Identity Header ── */
.info-modal-header {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    margin-top: -26px;
    padding: 0 22px 18px;
    background: var(--bg);
    border-radius: 22px 22px 0 0;
    border-bottom: 1px solid var(--border);
}
.info-modal-header-content {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding-top: 12px;
}
.info-modal-logo,
.info-modal-logo-placeholder {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 3px solid var(--bg);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13),
                0 0 0 1px var(--gold-border);
    margin-top: -38px;
    position: relative;
    z-index: 5;
    background: var(--surface);
}
.info-modal-logo             { object-fit: cover; display: block; }
.info-modal-logo-placeholder { display: flex; align-items: center; justify-content: center; }
.info-modal-logo-placeholder svg,
.info-modal-badge            { display: none; }

.info-modal-header-text { flex: 1; min-width: 0; padding-bottom: 3px; }
.info-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ── Hidden Structural Elements ── */
.info-modal-tabs,
.info-tab,
.info-hour-divider,
.info-menu-pulse,
.info-menu-divider-line,
.info-menu-divider-dot,
.info-wifi-header,
.info-contact-label { display: none !important; }


/* ── Scroll Area ── */
.info-modal-content {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
}
.info-modal-content::-webkit-scrollbar       { width: 3px; }
.info-modal-content::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 2px; }
.info-tab-content,
.info-tab-content.active { display: block; }


/* ── Section ── */
.info-section {
    padding: 22px;
    border-bottom: 1px solid var(--border);
}
.info-section:last-child { border-bottom: none; }

.info-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.info-section-header h3 {
    order: 1;
    flex: 1;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.3px;
}
.info-section-header h3::after { display: none; }
.info-section-header > svg {
    order: 2;
    display: block;
    width: 15px;
    height: 15px;
    color: var(--gold);
    stroke-width: 2;
    flex-shrink: 0;
    opacity: 0.65;
}


/* ── Contact Rows ── */
.info-contact-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.info-contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    cursor: default;
    transition: background 0.14s;
}
a.info-contact-card              { cursor: pointer; }
a.info-contact-card:hover        { background: var(--gold-soft); }
a.info-contact-card::after {
    content: '›';
    margin-left: auto;
    padding-left: 8px;
    color: var(--gold);
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
a.info-contact-card:hover::after { transform: translateX(3px); }

/* Icon bubble */
.info-contact-icon {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}
.info-contact-icon svg   { display: block; width: 18px; height: 18px; stroke-width: 1.8; }
.info-contact-icon.location { background: rgba(212, 165, 116, 0.13); color: var(--gold); }
.info-contact-icon.phone    { background: rgba(22, 163, 74, 0.10);   color: #16a34a; }
.info-contact-icon.email    { background: rgba(59, 130, 246, 0.10);  color: #3b82f6; }

.info-contact-text  { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.info-contact-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    word-break: break-word;
}
a.info-contact-card .info-contact-value { color: var(--gold-dark); }

/* Map button */
.info-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--gold-border);
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}
.info-map-btn:hover  { background: rgba(212, 165, 116, 0.16); }
.info-map-btn svg    { display: block; width: 13px; height: 13px; stroke-width: 2; }


/* ── WiFi ── */
.info-wifi-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    background: none;
    padding: 0;
    overflow: visible;
    border-radius: 0;
}
.info-wifi-label {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 500;
    color: var(--sub);
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.info-wifi-password {
    flex: 1;
    text-align: right;
    font: 600 14px/1 'SF Mono', ui-monospace, monospace;
    letter-spacing: 1.5px;
    color: var(--text);
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 10px 0;
    user-select: all;
    cursor: pointer;
    word-break: break-all;
    transition: color 0.15s;
}
.info-wifi-password:hover { color: var(--gold-dark); }
.info-wifi-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    flex: none;
    margin-top: 12px;
    padding: 11px 0;
    border-radius: 10px;
    border: 1.5px solid var(--gold-border);
    background: var(--gold-soft);
    color: var(--gold-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.info-wifi-copy svg         { display: block; width: 13px; height: 13px; stroke-width: 2; }
.info-wifi-copy:hover       { background: rgba(212, 165, 116, 0.16); border-color: rgba(212, 165, 116, 0.4); }
.info-wifi-copy.copied      { background: rgba(22, 163, 74, 0.09); border-color: rgba(22, 163, 74, 0.25); color: #16a34a; }


/* ── Working Hours ── */
.info-hours-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.info-hour-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: border-color 0.15s;
}
.info-hour-item:hover { border-color: var(--gold-border); }
.info-hour-icon {
    display: flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}
.info-hour-icon.open  { background: rgba(22, 163, 74, 0.10); color: #16a34a; }
.info-hour-icon.close { background: rgba(220, 38, 38, 0.10); color: #dc2626; }
.info-hour-icon svg   { display: block; width: 14px; height: 14px; stroke-width: 2.2; }
.info-hour-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.info-hour-item:first-child .info-hour-label { color: #16a34a; }
.info-hour-item:last-child  .info-hour-label { color: #dc2626; }
.info-hour-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1.5px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}


/* ── Menu Stats ── */
.info-menu-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.info-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 14px;
    cursor: default;
    transition: background 0.15s;
}
.info-menu-item:hover { background: var(--gold-soft); }
.info-menu-icon {
    display: flex;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
}
.info-menu-icon.categories { background: rgba(212, 165, 116, 0.13); color: var(--gold); }
.info-menu-icon.products   { background: rgba(99, 102, 241, 0.10);  color: #6366f1; }
.info-menu-icon svg        { display: block; width: 17px; height: 17px; stroke-width: 1.8; }
.info-menu-label {
    font-size: 9.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.info-menu-value {
    font-size: 38px;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
    letter-spacing: -2px;
}
.info-menu-divider { width: 1px; align-self: stretch; background: var(--border); }


/* ── Social Links ── */
.info-social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.info-social-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 100px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}
.info-social-card svg  { display: block; width: 16px; height: 16px; stroke-width: 1.8; flex-shrink: 0; }
.info-social-card span { font-size: 13px; font-weight: 700; color: var(--text); transition: color 0.18s; }

.info-social-card.instagram { color: #c13584; }
.info-social-card.facebook  { color: #1877f2; }

.info-social-card.instagram:hover {
    background: linear-gradient(135deg, #fd5949, #d6249f, #285aeb);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(214, 36, 159, 0.22);
}
.info-social-card.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.22);
}
.info-social-card.instagram:hover span,
.info-social-card.facebook:hover span { color: #fff; }


/* ── Footer CTA ── */
.info-modal-footer {
    flex-shrink: 0;
    padding: 14px 22px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.info-modal-btn {
    width: 100%;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-grad);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.30);
    transition: opacity 0.15s, transform 0.18s, box-shadow 0.15s;
}
.info-modal-btn svg    { display: none; }
.info-modal-btn:hover  { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(212, 165, 116, 0.38); }
.info-modal-btn:active { transform: none; }


/* ── Responsive — Bottom Sheet ── */
@media (max-width: 720px) {
    .info-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .info-modal {
        max-width: 100%;
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
        animation: sheet-in 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    }
    @keyframes sheet-in {
        from { opacity: 0; transform: translateY(50px); }
        to   { opacity: 1; transform: none; }
    }
    .info-modal-hero   { height: 230px; }
    .info-modal-header { margin-top: -24px; padding: 0 18px 14px; }
    .info-modal-logo,
    .info-modal-logo-placeholder { width: 58px; height: 58px; margin-top: -34px; }
    .info-section      { padding: 18px; }
    .info-modal-footer { padding: 12px 18px 14px; }
}

@media (max-width: 480px) {
    .info-modal        { max-height: 96vh; }
    .info-modal-hero   { height: 200px; }
    .info-modal-header { margin-top: -22px; padding: 0 16px 12px; }
    .info-modal-logo,
    .info-modal-logo-placeholder { width: 52px; height: 52px; margin-top: -30px; }
    .info-modal-title  { font-size: 17px; }
    .info-section      { padding: 16px; }
    .info-modal-footer { padding: 10px 16px; }
    .info-hour-value   { font-size: 23px; }
    .info-menu-value   { font-size: 32px; }
}

@media (max-width: 380px) {
    .info-modal-hero              { height: 175px; }
    .info-section-header h3       { font-size: 10px; }
    .info-hour-value              { font-size: 20px; }
    .info-menu-value              { font-size: 28px; }
    .info-wifi-password           { font-size: 13px; letter-spacing: 0.8px; }
}

/* ── Disable hover transforms on touch ── */
@media (hover: none) and (pointer: coarse) {
    .info-modal-close:hover,
    .info-hero-share-btn:hover,
    .info-hour-item:hover,
    .info-menu-item:hover,
    .info-social-card:hover,
    .info-map-btn:hover,
    .info-wifi-copy:hover,
    .info-modal-btn:hover { transform: none; }
}
