
:root {
    --em-rp-bg: #f6f8fb;
    --em-rp-card: #ffffff;
    --em-rp-border: #e7ebf0;
    --em-rp-text: #1f2937;
    --em-rp-muted: #6b7280;
    --em-rp-primary: #3b82f6;
    --em-rp-primary-hover: #2563eb;
    --em-rp-shadow: 0 6px 16px rgba(18, 38, 63, 0.08);
}

.mimamenu-restaurant-profile-page {
    color: var(--em-rp-text);
}

.mimamenu-restaurant-profile-page .mimamenu-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.mimamenu-restaurant-profile-page .mimamenu-page-title {
    margin: 0 0 6px;
    font-size: 32px;
    line-height: 1.2;
}

.mimamenu-restaurant-profile-page .mimamenu-subhint {
    color: var(--em-rp-muted);
    font-size: 14px;
}

.mimamenu-restaurant-profile-page .mimamenu-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mimamenu-restaurant-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.mimamenu-restaurant-main,
.mimamenu-restaurant-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.mimamenu-restaurant-side {
    position: sticky;
    top: 44px;
}

.mimamenu-restaurant-profile-page .mimamenu-card {
    background: var(--em-rp-card);
    border: 1px solid var(--em-rp-border);
    border-radius: 14px;
    box-shadow: var(--em-rp-shadow);
    padding: 18px;
}

.mimamenu-restaurant-profile-page .mimamenu-card-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: var(--em-rp-text);
}

.mimamenu-restaurant-profile-page .em-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: .15s ease-in-out;
}

.mimamenu-restaurant-profile-page .em-btn-primary {
    background: var(--em-rp-primary);
    color: #fff;
}

.mimamenu-restaurant-profile-page .em-btn-primary:hover,
.mimamenu-restaurant-profile-page .em-btn-primary:focus {
    background: var(--em-rp-primary-hover);
    color: #fff;
}

.mimamenu-restaurant-profile-page .em-btn-ghost,
.mimamenu-restaurant-profile-page .button.button-secondary {
    background: #fff;
    border: 1px solid var(--em-rp-border);
    color: #334155;
    border-radius: 10px;
    min-height: 38px;
    padding: 0 14px;
}

.mimamenu-restaurant-profile-page .button.button-link-delete {
    color: #dc2626;
}

.em-form-grid {
    display: grid;
    gap: 14px;
}

.em-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.em-basic-grid {
    align-items: start;
}

.em-section-space {
    margin-top: 16px;
}

.em-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--em-rp-text);
}

.mimamenu-restaurant-profile-page .em-field input[type="text"],
.mimamenu-restaurant-profile-page .em-field input[type="email"],
.mimamenu-restaurant-profile-page .em-field input[type="url"],
.mimamenu-restaurant-profile-page .em-field input[type="number"],
.mimamenu-restaurant-profile-page .em-field select,
.mimamenu-restaurant-profile-page .em-field textarea {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: var(--em-rp-text);
    box-shadow: none;
    padding: 10px 12px;
}

.mimamenu-restaurant-profile-page .em-field input[type="text"],
.mimamenu-restaurant-profile-page .em-field input[type="email"],
.mimamenu-restaurant-profile-page .em-field input[type="url"],
.mimamenu-restaurant-profile-page .em-field input[type="number"],
.mimamenu-restaurant-profile-page .em-field select {
    min-height: 42px;
}

.mimamenu-restaurant-profile-page .em-field select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.mimamenu-restaurant-profile-page .em-field textarea {
    min-height: 86px;
    resize: vertical;
}

.mimamenu-restaurant-profile-page .em-field input:focus,
.mimamenu-restaurant-profile-page .em-field select:focus,
.mimamenu-restaurant-profile-page .em-field textarea:focus {
    border-color: var(--em-rp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: 0;
}


.em-field-hint {
    margin: 7px 0 0;
    color: var(--em-rp-muted);
    font-size: 12px;
    line-height: 1.45;
}

.em-field-logo {
    max-width: 320px;
}

.em-logo-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.em-logo-preview {
    width: 118px;
    height: 118px;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #64748b;
    text-align: center;
    padding: 12px;
}

.em-logo-preview.has-image {
    border-style: solid;
    background: #fff;
}

.em-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.em-logo-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.em-map-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.em-map-status {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.em-map-status.is-success {
    color: #15803d;
}

.em-map-status.is-error {
    color: #b91c1c;
}

.em-map-status.is-loading {
    color: #1d4ed8;
}

.em-map-wrap {
    margin-top: 14px;
}

.em-restaurant-map {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dbe3ef;
    background: #eef2f7;
}

@media (max-width: 1100px) {
    .mimamenu-restaurant-layout {
        grid-template-columns: 1fr;
    }

    .mimamenu-restaurant-side {
        position: static;
    }
}

@media (max-width: 900px) {
    .em-form-grid-2 {
        grid-template-columns: 1fr;
    }

    .em-field-logo {
        max-width: none;
    }
}

@media (max-width: 782px) {
    .mimamenu-restaurant-profile-page .mimamenu-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .mimamenu-restaurant-profile-page .mimamenu-toolbar {
        width: 100%;
    }

    .mimamenu-restaurant-profile-page .mimamenu-toolbar .em-btn {
        width: 100%;
    }

    .mimamenu-restaurant-profile-page .mimamenu-card {
        padding: 18px;
    }

    .em-restaurant-map {
        height: 280px;
    }
}

.em-timezone-field {
    max-width: none;
}

.em-timezone-combobox {
    position: relative;
}

.mimamenu-restaurant-profile-page .em-field .em-timezone-search {
    width: 100%;
    max-width: none;
    min-height: 46px;
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 20px) 20px, calc(100% - 14px) 20px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.em-timezone-combobox.is-open .em-timezone-search {
    border-color: var(--em-rp-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: 0;
}

.em-timezone-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #d8e0ea;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.em-timezone-combobox.is-open .em-timezone-menu {
    display: block;
}

.em-timezone-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--em-rp-text);
    text-align: left;
    cursor: pointer;
}

.em-timezone-option:hover,
.em-timezone-option.is-active {
    background: #eef6ff;
    color: #1d4ed8;
}

.em-timezone-option.is-selected {
    background: #e8f1ff;
    color: #1d4ed8;
    font-weight: 700;
}

.em-timezone-option.is-hidden {
    display: none;
}


.em-timezone-combobox.is-selected .em-timezone-search {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.em-timezone-option::before {
    content: '';
    display: inline-block;
    width: 16px;
}

.em-timezone-option.is-selected::before {
    content: '✓';
    color: #16a34a;
    font-weight: 800;
}

.em-location-card .em-field textarea {
    min-height: 92px;
}

.em-timezone-menu.has-no-results::after {
    content: 'No matching timezone found';
    display: block;
    padding: 12px;
    color: var(--em-rp-muted);
}

/* Polished restaurant profile layout */
.mimamenu-restaurant-layout {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.74fr);
}

.em-basic-top-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.em-field-name {
    min-width: 0;
}

.em-field-logo {
    max-width: 190px;
}

.em-logo-picker {
    align-items: flex-start;
}

.em-logo-preview {
    width: 148px;
    height: 148px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.em-logo-preview img {
    object-fit: contain;
    padding: 8px;
}

.em-logo-actions {
    width: 148px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.em-logo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: 0.16s ease;
}

.em-logo-btn-upload {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.em-logo-btn-upload:hover,
.em-logo-btn-upload:focus {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.13);
}

.em-logo-btn-remove {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.em-logo-btn-remove:hover,
.em-logo-btn-remove:focus {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #be123c;
    box-shadow: 0 7px 18px rgba(225, 29, 72, 0.12);
}

.em-timezone-card {
    border-color: #dbeafe !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08) !important;
}

.em-timezone-card .mimamenu-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.em-timezone-card .mimamenu-card-title::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.em-timezone-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 11px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
    color: #14532d;
}

.em-timezone-selected-label {
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.em-timezone-selected strong {
    font-size: 14px;
    color: #14532d;
}

.em-timezone-selected code {
    padding: 3px 7px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
}

.em-timezone-combobox.is-selected + .em-timezone-selected,
.em-timezone-selected.is-updated {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

@media (max-width: 1200px) {
    .mimamenu-restaurant-layout {
        grid-template-columns: 1fr;
    }

    .mimamenu-restaurant-side {
        position: static;
    }
}

@media (max-width: 782px) {
    .em-basic-top-row {
        grid-template-columns: 1fr;
    }

    .em-field-logo,
    .em-logo-actions {
        max-width: none;
        width: 100%;
    }

    .em-logo-preview {
        width: 132px;
        height: 132px;
    }

    .em-logo-actions {
        max-width: 220px;
    }
}

/* Basic info polish: logo left, name + description on the right */
.em-basic-top-row {
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: start;
}

.em-basic-info-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.em-field-description textarea {
    min-height: 112px;
}

.em-logo-picker {
    align-items: center;
}

.em-field-logo label {
    width: 148px;
    text-align: left;
}

.em-logo-actions {
    width: 148px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

.em-logo-btn {
    text-align: center;
}

@media (max-width: 782px) {
    .em-logo-picker {
        align-items: flex-start;
    }

    .em-field-logo label,
    .em-logo-actions {
        width: 100%;
        max-width: 220px;
        margin-left: 0;
        margin-right: 0;
        text-align: left;
    }
}

/* Business Profile tabs */
.em-profile-tabs {
    margin: 12px 0 18px;
    border-bottom: 1px solid #dbe3ef;
}

.em-profile-tabs .nav-tab {
    border-radius: 10px 10px 0 0;
    font-weight: 700;
}

.em-profile-tabs .nav-tab-active {
    background: #ffffff;
    border-bottom-color: #ffffff;
    color: #1d4ed8;
}

.em-profile-tab-panel {
    max-width: 1120px;
}

.em-profile-tab-panel .mimamenu-card,
.em-profile-tab-panel .mimamenu-box {
    margin-bottom: 18px;
}

.em-profile-tab-location,
.em-profile-tab-timezone,
.em-profile-tab-languages,
.em-profile-tab-currency {
    max-width: 920px;
}

.em-profile-tab-location .em-restaurant-map {
    height: 380px;
}

.em-profile-embedded-box {
    background: #fff;
    border: 1px solid var(--em-rp-border);
    border-radius: 14px;
    box-shadow: var(--em-rp-shadow);
    padding: 18px;
}

.em-profile-tab-panel .mimamenu-box h1 {
    margin-top: 0;
    font-size: 20px;
    line-height: 1.3;
}

@media (max-width: 782px) {
    .em-profile-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 6px;
        border-bottom: 0;
    }

    .em-profile-tabs .nav-tab {
        flex: 0 0 auto;
        margin: 0;
        border-radius: 999px;
        border: 1px solid #dbe3ef;
    }

    .em-profile-tabs .nav-tab-active {
        border-color: #93c5fd;
        background: #eff6ff;
    }
}
