/* mr-business front-end styles */

.mr-store--card {
    --mrb-text: #2c2c2c;
    --mrb-text-soft: #5a6270;
    --mrb-text-muted: #98a0ad;
    --mrb-icon: #c8a97e;
    --mrb-status-open: #95b8a8;
    --mrb-status-paused: #d4a574;
    --mrb-status-closed: #a8a8a8;
    --mrb-divider: #e5e7eb;
    --mrb-accent-line: #4a5568;
    --mrb-star-color: #ffc83d;
    --mrb-rating-serif: Georgia, "Times New Roman", "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;

    box-sizing: border-box;
    margin: 28px 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--mrb-text);
    font-size: 15px;
    line-height: 1.75;
    position: relative;
}

.mr-store--card *,
.mr-store--card *::before,
.mr-store--card *::after {
    box-sizing: border-box;
}

/* Header: store name + status badge */
.mr-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--mrb-divider);
    position: relative;
}

.mr-store-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 40px;
    height: 2px;
    background: var(--mrb-accent-line);
    border-radius: 2px;
}

.mr-store-name {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--mrb-text);
    letter-spacing: 1px;
    line-height: 1.3;
}

.mr-store-status {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 13px;
    color: #fff;
    background: var(--mrb-status-open);
    border-radius: 3px;
    font-weight: 400;
    letter-spacing: 1.5px;
    line-height: 1.6;
}

.mr-store-status--open    { background: var(--mrb-status-open); }
.mr-store-status--paused  { background: var(--mrb-status-paused); }
.mr-store-status--closed  { background: var(--mrb-status-closed); }

/* Body: 2-column layout (info | rating) */
.mr-store-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 0;
    align-items: center;
}

.mr-store-info {
    padding: 4px 32px 4px 0;
}

/* Info rows */
.mr-store-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 7px 0;
    line-height: 1.7;
}

.mr-store-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--mrb-icon);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mr-icon-svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.mr-store-text {
    flex: 1;
    min-width: 0;
    color: var(--mrb-text);
    word-break: break-word;
}

/* Inline external link button (e.g. 地圖) — inherits theme link color */
.mr-store-extlink {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    padding: 3px 12px;
    background: transparent;
    border: 1px solid currentColor;
    text-decoration: none;
    font-size: 13px;
    border-radius: 3px;
    font-weight: 400;
    letter-spacing: 1px;
    transition: opacity .15s;
    align-self: center;
    margin-top: 0;
}

.mr-store-row--address {
    align-items: flex-start;
}

.mr-store-row--address .mr-store-extlink {
    align-self: flex-start;
    margin-top: 1px;
}

.mr-store-extlink:hover {
    opacity: 0.7;
}

.mr-extlink-svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
}

/* Phone — inherits theme link color */
.mr-store-phone-link {
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 1.5px;
    font-size: 17px;
    transition: opacity .15s;
}

.mr-store-phone-link:hover {
    opacity: 0.75;
}

/* Hours list */
.mr-store-hours-list {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mr-store-hours-item {
    display: flex;
    gap: 24px;
    padding: 1px 0;
    line-height: 1.85;
}

.mr-store-hours-day {
    flex-shrink: 0;
    width: 56px;
    color: var(--mrb-text);
    font-weight: 500;
}

.mr-store-hours-time {
    color: var(--mrb-text-soft);
}

/* Links row */
.mr-store-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
}

.mr-store-links a {
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: opacity .15s, border-color .15s;
}

.mr-store-links a:hover {
    opacity: 0.75;
    border-bottom-color: currentColor;
}

.mr-store-links-sep {
    color: var(--mrb-text-muted);
    margin: 0 10px;
}

/* Rating box (right column) — no border / no background */
.mr-store-rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 28px;
    border-left: 1px solid var(--mrb-divider);
    gap: 12px;
    align-self: stretch;
}

.mr-store-rating-num {
    font-family: var(--mrb-rating-serif);
    font-size: 92px;
    font-weight: 400;
    line-height: 1;
    color: var(--mrb-text);
    letter-spacing: 1px;
    margin: 0;
    font-feature-settings: "tnum";
}

.mr-store-rating-meta {
    font-size: 14px;
    color: var(--mrb-text-muted);
    margin-top: 6px;
    letter-spacing: 1px;
}

.mr-store-rating-empty {
    font-size: 14px;
    color: var(--mrb-text-muted);
    line-height: 1.7;
}

/* Stars */
.mr-stars {
    --mrb-star-size: 22px;
    display: inline-flex;
    gap: 2px;
    vertical-align: middle;
}

.mr-store-rating-box .mr-stars {
    --mrb-star-size: 32px;
    gap: 4px;
}

.mrb-star {
    position: relative;
    width: 1em;
    height: 1em;
    font-size: var(--mrb-star-size);
    line-height: 1;
}

.mrb-star-bg {
    position: absolute;
    inset: 0;
    line-height: 1;
    color: #e6e0d4;
}

.mrb-star-fg {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    line-height: 1;
    color: var(--mrb-star-color);
    overflow: hidden;
    white-space: nowrap;
    width: var(--mrb-fill, 0%);
    z-index: 1;
}

/* Note text (only when row has note) — subtle, no box */
.mr-store-note-text {
    margin: 18px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--mrb-divider);
    color: var(--mrb-text-soft);
    font-size: 14px;
    line-height: 1.75;
}

/* ----- Responsive: tablet & mobile ----- */
@media (max-width: 768px) {
    .mr-store--card {
        margin: 20px 0;
    }

    .mr-store-header {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 14px;
        margin-bottom: 18px;
    }

    .mr-store-name {
        font-size: 20px;
    }

    .mr-store-body {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mr-store-info {
        padding: 0;
        order: 1;
    }

    .mr-store-rating-box {
        order: 2;
        padding: 22px 0 0;
        margin-top: 18px;
        border-left: none;
        border-top: 1px solid var(--mrb-divider);
        gap: 10px;
    }

    .mr-store-rating-num {
        font-size: 76px;
    }

    .mr-store-rating-box .mr-stars {
        --mrb-star-size: 30px;
    }

    .mr-store-row {
        gap: 14px;
        padding: 6px 0;
    }

    .mr-store-row--address {
        flex-wrap: wrap;
    }

    .mr-store-row--address .mr-store-extlink {
        margin-left: 38px;
        margin-top: 1px;
    }

    .mr-store-hours-item {
        gap: 16px;
    }
}
