/**
 * Nomnom Kitchen Theme Stylesheet
 * Responsive layout with calibrated vertical spacing:
 * - Title ~28-30% from top
 * - Content & actions ~10-15% from bottom
 * - Separated 3 shop buttons on homepage
 */

/** reset css **/
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
footer, header, hgroup, menu, nav, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

body {
    line-height: 1;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

ul, ol {
    list-style: none;
}

nav ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

a {
    margin: 0;
    padding: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}

ins {
    background-color: #ff9;
    color: #000;
    text-decoration: none;
}

mark {
    background-color: #ff9;
    color: #000;
    font-style: italic;
    font-weight: bold;
}

del {
    text-decoration: line-through;
}

abbr[title], dfn[title] {
    border-bottom: 1px dotted;
    cursor: help;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #cccccc;
    margin: 1em 0;
    padding: 0;
}

input, select {
    vertical-align: middle;
}

/** Design tokens: the values every page shares. The rules are in
 * docs/DESIGN.md; change a value here, not in the rules below. **/
:root {
    --font: "Dosis", sans-serif;
    --text-size: 19px;               /* body text: branch details, notices */
    --btn-size: 16.5px;              /* every button and button-like link */
    --btn-weight: 500;               /* renders as Dosis Regular (400) */
    --btn-pad: 10px 18px;
    --btn-radius: 3px;
    --btn-border: 1px solid rgba(255, 255, 255, 0.85);
    --btn-bg: rgba(0, 0, 0, 0.5);
    --accent: #f5c518;
    --accent-strong: #e6a23c;
}

/* Phones: larger than the original site (15.5px text, 35px buttons) so
   text is comfortable to read and buttons reach the 44px touch height.
   Same weights: only the size grows. */
@media only screen and (max-width: 768px) {
    :root {
        --text-size: 17px;
        --btn-size: 16px;
        --btn-pad: 13px 12px;        /* 16 + 2 x 13 + 2 border = 44px tall */
    }
}

@media only screen and (max-width: 380px) {
    :root {
        --text-size: 16px;
        --btn-size: 15px;
        --btn-pad: 12px 9px;         /* 41px tall; narrower so the branch
                                        buttons stay on one line */
    }
}

/** Global Styles **/
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    height: 100%;
    font-family: var(--font);
    background-color: #111;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

div#wrapper {
    display: flex;
    flex-direction: column;
    max-width: 1024px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    z-index: 50;
    box-sizing: border-box;
}

.img-responsive {
    width: 100%;
    height: auto;
}

.clear {
    clear: both;
}

/** Background Slider **/
/* The full-screen background is ezd_slider "background" with class "slider".
   These rules make it fixed behind the page; .slider.ezd-slider outranks the
   plugin's own generic slider styles. */
.slider.ezd-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.slider.ezd-slider:after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 5;
    pointer-events: none;
}

.slider.ezd-slider .ezd-slider-track,
.slider.ezd-slider .ezd-slide,
.slider.ezd-slider .ezd-slide.is-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.slider.ezd-slider .ezd-slide img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/** Header **/
.header {
    padding: 10px 20px;
    margin: 0;
    height: 70px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 100px;
    display: block;
    /* Same distance from the top as the Facebook icon, which the header
       centres: (70px header - 36px icon) / 2 = 17px, less the header's 10px
       padding. The logo is taller than the header, so centring it too would
       push it above the top of the page. */
    align-self: flex-start;
    margin-top: 7px;
}

.logo img {
    width: 90px;
    /* The tag carries the image's own width and height (200 x 200) so the
       page does not jump while it loads; scale the height with the width. */
    height: auto;
    display: block;
    transition: transform 1.2s ease;
}

.logo a:hover img {
    transform: rotateY(360deg);
}

.social {
    display: flex;
    align-items: center;
}

.social ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.social li {
    margin-left: 10px;
}

.social li a img {
    width: 36px;
    height: 36px;
    display: block;
    transition: transform 0.2s ease;
}

.social li a:hover img {
    transform: scale(1.1);
}

/** Store Pages Container (Rangiora, Strowan, Lincoln) **/
#container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 0 15px 25px 15px;
    z-index: 50;
}

/* Store Title: Positioned ~28-30% from the top */
.store-name-wrapper {
    text-align: center;
    width: 100%;
    padding-top: max(26vh, 125px);
    margin: 0 auto;
    clear: both;
    box-sizing: border-box;
}

.store-name {
    color: #ffffff !important;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95);
    margin: 0 auto;
    display: inline-block;
}

/* Text Content: Positioned towards the bottom */
/* Branch details and their buttons are right-aligned, on one right edge:
   both boxes keep 15px inside the container (10px on phones). */
.content {
    width: 100%;
    max-width: 750px;
    margin: auto 0 15px auto;
    padding: 0 15px;
    text-align: right;
    box-sizing: border-box;
}

.content .tagline {
    color: #fff;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    letter-spacing: 0.5px;
}

.content p {
    color: #fff;
    font-size: var(--text-size);
    margin-bottom: 10px;
    line-height: 1.38;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.content h3 {
    color: #fff;
    font-size: 18px;
    display: inline-block;
    font-weight: 400;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

a.phone-number, a[href^=tel] {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.line-top {
    border-bottom: 1px dotted rgba(255, 255, 255, 0.8);
    padding-bottom: 2px;
}

span.time-group {
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    padding-left: 8px;
    margin-left: 5px;
}

/* Buttons / Nav Footer: ~10% from the bottom */
.nav-footer {
    margin: 10px auto max(3vh, 15px) auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    padding: 0 15px;
    clear: both;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-footer .nav {
    display: inline-block;
}

.nav-footer .nav ul {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-footer .nav li {
    display: inline-block;
    margin: 0;
}

/* One button style for the whole site: the branch buttons (Menu, Online
   order, Book now, Back) and the home page's branch buttons. */
.nav-footer .nav li a,
.nav-footer .nav li button,
.nav-footer-home .nav li a {
    padding: var(--btn-pad);
    font-size: var(--btn-size);
    font-weight: var(--btn-weight);
    text-decoration: none;
    color: #fff;
    border: var(--btn-border);
    background: var(--btn-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: block;
    border-radius: var(--btn-radius);
    transition: all 0.25s ease;
}

.nav-footer .nav li a:hover,
.nav-footer .nav li button:hover,
.nav-footer-home .nav li a:hover {
    color: #000;
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.nav-footer .nav li a.fa-home {
    padding: 10px 14px;
    font-size: 18px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.nav-footer .nav li a.fa-home:hover {
    color: #000;
}

.nav-footer .social {
    margin: 0;                       /* first in the row; the row's gap spaces it */
}

.nav-footer .social li {
    margin: 0;
}

.nav-footer .social li a img {
    width: 38px;
    height: 38px;
    display: block;
}

/** Homepage Layout (#home-container) **/
#home-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding: 0 20px 20px 20px;
    z-index: 50;
}

/* Homepage Title & Subtitle: Perfectly centered vertically & horizontally for maximum reader focus */
.home-content {
    position: relative;
    width: 100%;
    max-width: 780px;
    margin: auto auto;
    padding: 0 20px;
    text-align: center;
    box-sizing: border-box;
}

.home-content h1 {
    color: #fff;
    font-size: 34px;
    margin-bottom: 16px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
}

.home-content p {
    color: #fff;
    font-size: 22px;
    margin-bottom: 0;
    line-height: 1.4;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95);
    font-weight: 300;
}

/* Homepage 3 Shops: Positioned near the bottom */
.nav-footer-home {
    margin: 0 auto max(5vh, 25px) auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    clear: both;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 50;
}

.nav-footer-home .nav {
    width: auto;
}

.nav-footer-home .nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-footer-home .nav li {
    display: inline-block;
    margin: 0;
}


/** Responsive Layout Rules for Mobile & Tablet **/
@media only screen and (max-width: 768px) {
    .header {
        padding: 8px 15px;
        height: 60px;
    }

    .logo {
        margin-top: 6px;             /* (60 - 32) / 2 - 8 = 6px, as above */
    }

    .logo img {
        width: 75px;
    }

    .social li a img {
        width: 32px;
        height: 32px;
    }

    /* Store page on mobile */
    #container {
        padding: 0 10px 15px 10px;
    }

    .store-name-wrapper {
        padding-top: max(27vh, 115px);
    }

    .store-name {
        font-size: 30px;
        letter-spacing: 3px;
    }

    .content {
        margin-top: auto;
        margin-bottom: 12px;
        padding: 0 10px;
    }

    .content .tagline {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .content p {
        margin-bottom: 6px;
        line-height: 1.35;
    }

    .content h3 {
        font-size: var(--text-size);
        margin-bottom: 6px;
    }

    .nav-footer {
        margin: 8px auto max(4vh, 15px) auto;
        padding: 0 10px;                 /* as .content, so both end on one edge */
        gap: 5px;
    }

    .nav-footer .nav ul {
        gap: 5px;
    }

    .nav-footer .nav li a.fa-home {
        padding: 13px 12px;          /* as tall as the other buttons */
        font-size: 16px;
    }

    .nav-footer .social {
        margin: 0;
    }

    .nav-footer .social li a img {
        width: 36px;
        height: 36px;
    }

    /* Homepage on mobile */
    #home-container {
        padding: 0 15px 15px 15px;
    }

    .home-content {
        margin: auto auto;
        padding: 0 15px;
    }

    .home-content h1 {
        font-size: 28px;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .home-content p {
        font-size: 18px;
        line-height: 1.38;
    }

    .nav-footer-home {
        margin: 0 auto max(6vh, 20px) auto;
        padding: 0 10px;
    }

    .nav-footer-home .nav ul {
        gap: 10px;
    }
}

@media only screen and (max-width: 380px) {
    .store-name {
        font-size: 26px;
        letter-spacing: 2px;
    }

    .content .tagline {
        font-size: 18px;
    }

    .nav-footer .nav li a.fa-home {
        padding: 12px 9px;
        font-size: 15px;
    }

    .nav-footer .social li a img {
        width: 36px;
        height: 36px;
    }
}

/* Short phones (e.g. 375 x 667, 320 x 568): less space above the branch
   name, so a branch with three lines of hours still fits on one screen. */
@media only screen and (max-width: 768px) and (max-height: 700px) {
    .store-name-wrapper {
        padding-top: max(16vh, 80px);
    }
}

/* Landscape orientation optimization */
@media only screen and (max-height: 520px) and (orientation: landscape) {
    .store-name-wrapper {
        padding-top: 60px;
    }
    .store-name {
        font-size: 24px;
    }
    .content {
        margin-top: 10px;
        margin-bottom: 8px;
    }
    .content .tagline, .home-content h1 {
        font-size: 18px;
        margin-bottom: 6px;
    }
    .content p, .home-content p {
        font-size: 14px;
        margin-bottom: 4px;
    }
    .nav-footer, .nav-footer-home {
        margin: 5px auto 10px auto;
    }
    .home-content {
        padding-top: 65px;
    }
}

/* ==========================================================================
   ResDiary Modal Popup Styles
   ========================================================================== */
.rd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 12px;
}

.rd-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1;
}

.rd-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: rdModalFadeIn 0.3s ease-out;
}

@keyframes rdModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.rd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #111111;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rd-modal-title {
    color: #ffffff;
    font-size: 18px;
    font-family: var(--font);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rd-modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.rd-modal-close:hover {
    opacity: 1;
    transform: scale(1.15);
    color: #ff6b6b;
}

.rd-modal-body {
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    background: #ffffff;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.rd-modal-body iframe {
    width: 100%;
    height: 520px;
    max-height: 68vh;
    border: none;
    display: block;
    flex: 1;
}

.rd-modal-link-wrap {
    text-align: center;
    padding: 10px 15px;
    background: #f4f4f4;
    border-top: 1px solid #e2e2e2;
}

.rd-direct-link {
    display: inline-block;
    color: #1a56db;
    text-decoration: underline;
    font-size: 14px;
    font-family: var(--font);
    font-weight: 700;
    transition: color 0.2s ease;
}

.rd-direct-link:hover {
    color: #0b328a;
}

/* ==========================================================================
   Order Notice Modal Styles
   ========================================================================== */
.order-modal-dialog {
    max-width: 480px;
    background: #1a1a1a;
    border: 1px solid rgba(245, 197, 24, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(245, 197, 24, 0.15);
}

.order-modal-body {
    padding: 28px 24px 24px 24px;
    text-align: center;
    background: #181818;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-notice-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.order-notice-heading {
    font-family: var(--font);
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.order-notice-text {
    font-size: var(--text-size);
    line-height: 1.5;
    color: #f0f0f0;
    margin-bottom: 8px;
}

.order-notice-text strong {
    color: #f5c518;
    font-weight: 700;
    text-decoration: underline;
}

.order-notice-sub {
    font-size: var(--text-size);
    line-height: 1.45;
    color: #b0b0b0;
    margin-bottom: 24px;
}

.order-modal-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 5px;
}

/* The notice's buttons have the site's button size and type (tokens above);
   only their colours differ: Proceed is the accent, Cancel is quiet. */
.order-btn-cancel,
.order-btn-proceed {
    display: inline-block;
    padding: var(--btn-pad);
    font-family: var(--font);
    font-size: var(--btn-size);
    font-weight: var(--btn-weight);
    line-height: 1;                  /* as the page's buttons (reset above) */
    border-radius: var(--btn-radius);
    text-decoration: none;
    cursor: pointer;
    margin: 0;
}

.order-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

.order-btn-proceed {
    background: var(--accent-strong);
    border: 1px solid var(--accent-strong);
    color: #111111 !important;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(230, 162, 60, 0.35);
}

.order-btn-proceed:hover {
    background: #f5c518;
    border-color: #f5c518;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.5);
}

/* Article sections (/articles/ and any section on pages/default.txp).
   The restaurant pages do not use these. */
.article-page {
    color: #fff;
    font-size: 19px;
    line-height: 1.38;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.article-page li {
    margin-bottom: 10px;
}

.article-page a {
    color: #f5c518;
    text-decoration: none;
}

.article-page a:hover {
    text-decoration: underline;
}

.article-page article {
    text-align: left;
}

.article-page article p {
    margin-bottom: 12px;
}

.article-page img {
    max-width: 100%;
    height: auto;
}

/* Menu and Back are buttons (they act on the page, they go nowhere). They
   take the link buttons' look from the rules above; this only undoes the
   browser's own button styling. */
.nav-footer .nav li button {
    font-family: inherit;
    line-height: inherit;
    cursor: pointer;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}

/* Icons: inline SVG drawn from the Font Awesome 4.7 glyphs they replace, in
   the same box the icon font used (1em high, the glyph's own width). */
.fa {
    display: inline-block;
    font-size: inherit;
    line-height: 1;
}

.fa-fw {
    width: 1.28571429em;
    text-align: center;
}

.fa-svg {
    display: inline-block;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.142857em;
}
