/*
====================================================================================================
COLETTE PHP8 - MODERNE MOBIILIKIHT (2026)
Aktiivne ainult <=1023px. Desktop jaab taielikult puutumata.
Asendab vana jQuery-pohise mobiilinavigatsiooni: fikseeritud paiseriba,
taisekraani menuu, pubivalik, alumine "Broneeri laud" tegevusriba.
====================================================================================================
*/

@media screen and (max-width: 1023px) {

    /* --- Vana mobiilipais ja trigger valja; meie kiht votab ule --- */
    .pt-header,
    .pt-navigation-trigger {
        display: none !important;
    }
    .pt-content {
        margin-left: 0 !important;
    }
    body {
        padding-top: 58px;
    }
    body.admin-bar {
        padding-top: 104px;
    }
    .pt-header-page h1 {
        padding-left: 0;
        line-height: 1.3;
    }

    /* --- Paiseriba --- */
    .cm-topbar {
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 9990;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 8px 0 14px;
        background: rgba(20, 16, 12, 0.96);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 2px 14px rgba(0,0,0,0.35);
    }
    body.admin-bar .cm-topbar { top: 46px; }

    .cm-topbar-logo {
        display: flex;
        align-items: center;
        min-width: 0;
        text-decoration: none;
    }
    .cm-topbar-logo img {
        max-height: 42px;
        width: auto;
        display: block;
    }
    .cm-topbar-logo span {
        color: #f4efe6;
        font-size: 17px;
        letter-spacing: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cm-burger {
        appearance: none;
        -webkit-appearance: none;
        background: transparent;
        border: 0;
        width: 48px;
        height: 48px;
        padding: 12px;
        cursor: pointer;
        display: block;
        position: relative;
        z-index: 10001;
    }
    .cm-burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #f4efe6;
        margin: 5px 0;
        border-radius: 2px;
        transition: transform .25s ease, opacity .2s ease;
    }
    body.cm-menu-open .cm-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    body.cm-menu-open .cm-burger span:nth-child(2) { opacity: 0; }
    body.cm-menu-open .cm-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* --- Taisekraani menuu --- */
    .cm-overlay {
        position: fixed;
        top: 0; right: 0; bottom: 0; left: 0;
        z-index: 9995;
        background: rgba(18, 14, 10, 0.97);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        padding: 78px 26px 40px 26px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
    }
    body.cm-menu-open .cm-overlay {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity .28s ease, transform .28s ease;
    }
    body.cm-menu-open {
        overflow: hidden;
    }
    body.admin-bar .cm-overlay { padding-top: 118px; }

    .cm-overlay nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    .cm-overlay nav > ul > li {
        border-bottom: 1px solid rgba(244, 239, 230, 0.12);
    }
    .cm-overlay nav > ul > li > a {
        display: block;
        padding: 15px 2px;
        color: #f4efe6;
        font-size: 19px;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        text-decoration: none;
        transition: color .15s ease, padding-left .15s ease;
    }
    .cm-overlay nav > ul > li > a:active,
    .cm-overlay nav > ul > li > a:hover {
        color: #d9b968;
        padding-left: 8px;
    }
    .cm-overlay nav ul ul {
        padding: 0 0 10px 18px;
    }
    .cm-overlay nav ul ul li {
        border: 0;
    }
    .cm-overlay nav ul ul li a {
        display: block;
        padding: 8px 2px;
        color: rgba(244, 239, 230, 0.75);
        font-size: 15px;
        letter-spacing: .8px;
        text-decoration: none;
    }
    .cm-overlay nav ul ul li a:active { color: #d9b968; }

    /* --- Pubivalik menuu jaluses --- */
    .cm-pubs {
        margin-top: 26px;
    }
    .cm-pubs-title {
        color: rgba(244, 239, 230, 0.55);
        font-size: 12px;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 12px;
    }
    .cm-pubs-row {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding-bottom: 4px;
    }
    .cm-pubs-row a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        height: 64px;
        background: rgba(244, 239, 230, 0.07);
        border: 1px solid rgba(244, 239, 230, 0.14);
        border-radius: 12px;
        padding: 8px;
        box-sizing: border-box;
    }
    .cm-pubs-row a:active {
        background: rgba(217, 185, 104, 0.18);
        border-color: #d9b968;
    }
    .cm-pubs-row img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        opacity: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* --- Alumine tegevusriba --- */
    .cm-bottombar {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 9992;
        display: flex;
        gap: 10px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) 14px;
        background: rgba(20, 16, 12, 0.96);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 -1px 0 rgba(255,255,255,0.08), 0 -2px 14px rgba(0,0,0,0.3);
    }
    .cm-bottombar a {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 46px;
        border-radius: 999px;
        font-size: 14px;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        text-decoration: none;
        transition: filter .15s ease, transform .1s ease;
    }
    .cm-bottombar a:active { transform: scale(.98); }
    .cm-cta-primary {
        background: #d9b968;
        color: #1d1710 !important;
        font-weight: bold;
    }
    .cm-cta-secondary {
        background: rgba(244, 239, 230, 0.1);
        border: 1px solid rgba(244, 239, 230, 0.25);
        color: #f4efe6 !important;
    }
    body.cm-has-bottombar {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }
}

/* Desktopil on kiht taielikult peidus */
@media screen and (min-width: 1024px) {
    .cm-topbar, .cm-overlay, .cm-bottombar, .cm-footer {
        display: none !important;
    }
}

/*
====================================================================================================
v2 TAIENDUSED: logo joondus, slaiditekst, menuu ikoonid + pubi logo,
tagasi-nupp, vormide kaart, avalehe jalus
====================================================================================================
*/

@media screen and (max-width: 1023px) {

    /* --- Paiseriba logo: rangelt keskele, ilma nihketa --- */
    .cm-topbar-logo {
        height: 58px;
        align-items: center;
        overflow: hidden;
    }
    .cm-topbar-logo img {
        max-height: 44px;
        max-width: 150px;
        object-fit: contain;
        margin: 0;
        padding: 0;
    }

    /* --- Avalehe slaiditekst: suurem ja loetavam --- */
    .top-slid {
        max-width: 86% !important;
        min-width: 0 !important;
        font-size: 19px !important;
        line-height: 1.35 !important;
    }
    body[class*="wpms"] .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1,
    .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 {
        font-size: 88px !important;
        line-height: 1.05 !important;
        letter-spacing: 1px;
    }
    body[class*="wpms"] .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 span,
    .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 span {
        font-size: 56px !important;
    }
    /* Ring pealkirja umber kasvab kaasa */
    .pt-slideshow .pt-slide-caption .pt-slide-caption-inner {
        width: 94% !important;
    }
    .pt-slideshow .pt-slide-caption .pt-slide-caption-inner:before {
        width: 360px !important;
        height: 360px !important;
        margin-top: -180px !important;
        margin-left: -180px !important;
    }
    /* Vaga kitsastel ekraanidel (alla 380px) veidi tagasi, et sona ei murduks */
    @media screen and (max-width: 379px) {
        body[class*="wpms"] .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1,
        .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 {
            font-size: 72px !important;
        }
        body[class*="wpms"] .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 span,
        .pt-slideshow .pt-slide-caption .pt-slide-caption-header h1 span {
            font-size: 46px !important;
        }
    }

    /* --- Menuu: pubi logo ulaosas --- */
    .cm-overlay-logo {
        text-align: center;
        margin-bottom: 18px;
    }
    .cm-overlay-logo img {
        max-height: 92px;
        max-width: 200px;
        width: auto;
        object-fit: contain;
    }

    /* --- Menuu ikoonid --- */
    .cm-nav-icon {
        display: inline-flex;
        width: 22px;
        height: 22px;
        margin-right: 14px;
        vertical-align: -4px;
        color: #d9b968;
        flex-shrink: 0;
    }
    .cm-nav-icon svg {
        width: 100%;
        height: 100%;
        display: block;
    }
    .cm-overlay nav > ul > li > a {
        display: flex;
        align-items: center;
    }

    /* --- Pubivaliku kaardid: ruudustikus, koik korraga nahtaval --- */
    .cm-pubs-row a {
        height: 72px;
    }

    /* --- Tagasi-nupp alumisel ribal --- */
    .cm-cta-back {
        flex: 0 0 46px !important;
        width: 46px;
        height: 46px;
        border-radius: 50% !important;
        background: rgba(244, 239, 230, 0.1);
        border: 1px solid rgba(244, 239, 230, 0.25);
        color: #f4efe6 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .cm-cta-back svg {
        width: 22px;
        height: 22px;
    }

    /* --- Vormid (Broneeri laud, Kontakt): moodne keskne kaart --- */
    .pt-content-page .wpcf7 {
        background: #fdfcfa;
        border: 1px solid #e6dfd2;
        border-radius: 16px;
        padding: 22px 18px;
        margin: 8px 0 20px 0;
        box-shadow: 0 2px 14px rgba(43, 35, 23, 0.06);
    }
    .pt-content-page .wpcf7 p {
        margin: 0 0 14px 0;
        font-size: 15px !important;
        line-height: 1.5;
        color: #4d4536;
    }
    .pt-content-page .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
    .pt-content-page .wpcf7 textarea,
    .pt-content-page .wpcf7 select {
        width: 100% !important;
        box-sizing: border-box;
        padding: 12px 14px;
        font-size: 16px;
        border: 1px solid #ddd4c2;
        border-radius: 10px;
        background: #fff;
        color: #2b2317;
        margin-top: 6px;
        -webkit-appearance: none;
        appearance: none;
        outline: none;
        transition: border-color .18s ease, box-shadow .18s ease;
    }
    .pt-content-page .wpcf7 select {
        height: 48px;
        background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238a7c5e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        padding-right: 38px;
    }
    .pt-content-page .wpcf7 input:focus,
    .pt-content-page .wpcf7 textarea:focus,
    .pt-content-page .wpcf7 select:focus {
        border-color: #c8a24b;
        box-shadow: 0 0 0 3px rgba(200, 162, 75, 0.22);
    }
    .pt-content-page .wpcf7 textarea {
        min-height: 100px;
    }
    .pt-content-page .wpcf7 input[type="submit"],
    .pt-content-page .wpcf7 .wpcf7-submit {
        width: 100%;
        padding: 15px 0;
        margin-top: 6px;
        background: #d9b968;
        color: #1d1710;
        font-size: 15px;
        font-weight: bold;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        border: none;
        border-radius: 999px;
        cursor: pointer;
    }
    .pt-content-page .wpcf7 input[type="submit"]:active {
        transform: scale(.98);
    }
    .pt-content-page .wpcf7 .wpcf7-list-item {
        margin-left: 0;
    }
    .pt-content-page .wpcf7 input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: #c8a24b;
        vertical-align: -4px;
        margin-right: 8px;
    }
    /* Vormileht: pealkirjad kenasti keskel */
    .page-template .pt-header-page h1,
    .pt-content-page.menu + * h1 {
        text-align: center;
    }

    /* --- Avalehe kontaktijalus --- */
    .cm-footer {
        position: relative;
        z-index: 5;
        background: #17120d;
        border-radius: 0;
        margin: 0;
        padding: 26px 20px 30px 20px;
        color: #f4efe6;
    }
    .cm-footer-title {
        font-size: 13px;
        letter-spacing: 2px;
        text-transform: uppercase;
        color: #d9b968;
        margin-bottom: 12px;
    }
    .cm-footer-info {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    .cm-footer-info strong {
        display: block;
        font-size: 17px;
        margin-bottom: 4px;
    }
    .cm-footer-info a {
        color: #d9b968;
        text-decoration: none;
    }
    .cm-footer .cm-pubs-title {
        margin-top: 4px;
    }
}

/* --- Menuuleht (Soogid/Joogid): moodne paigutus mobiilis --- */
@media screen and (max-width: 1023px) {

    /* Kategooriate kiirvalik: sinise loetelu asemel keritavad kiibid */
    .pt-content-page.menu .pealkiri-list {
        list-style: none;
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 2px 12px 2px;
        margin: 0 0 8px 0;
        scrollbar-width: none;
    }
    .pt-content-page.menu .pealkiri-list::-webkit-scrollbar { display: none; }
    .pt-content-page.menu .pealkiri-list li {
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
    }
    .pt-content-page.menu .pealkiri-list li:before { display: none; }
    .pt-content-page.menu .pealkiri-list a {
        display: inline-block;
        padding: 9px 16px;
        background: #f3efe6;
        border: 1px solid #e0d8c6;
        border-radius: 999px;
        font-size: 13.5px;
        letter-spacing: .3px;
        color: #5a4d33 !important;
        text-decoration: none;
        white-space: nowrap;
    }
    .pt-content-page.menu .pealkiri-list a:active {
        background: #d9b968;
        border-color: #d9b968;
        color: #1d1710 !important;
    }

    /* Kategooriapealkiri */
    .pt-content-page.menu h2 {
        text-align: center;
        font-size: 21px;
        letter-spacing: 2px;
        color: #8a6d2f;
        margin: 26px 0 14px 0;
        scroll-margin-top: 70px;
    }

    /* Uks roog: nimi vasakul, hind paremal, kirjeldus alla */
    .pt-content-page.menu .contain-item {
        border-bottom: 1px solid #eee7d8;
        padding: 12px 0;
    }
    .pt-content-page.menu .contain-item .item-top {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }
    .pt-content-page.menu .contain-item .item-top .left {
        width: auto !important;
        flex: 1;
        min-width: 0;
        text-align: left;
        float: none !important;
    }
    .pt-content-page.menu .contain-item .item-top .right {
        width: auto !important;
        flex: 0 0 auto;
        text-align: right;
        float: none !important;
    }
    .pt-content-page.menu .contain-item h3 {
        font-size: 16.5px !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        text-align: left !important;
        color: #2b2317;
    }
    .pt-content-page.menu .contain-item h4 {
        font-size: 13px !important;
        line-height: 1.45 !important;
        margin: 3px 0 0 0 !important;
        text-align: left !important;
        color: #9a917f !important;
        font-style: italic;
    }
    .pt-content-page.menu .contain-item h4 br:first-child { display: none; }
    .pt-content-page.menu .contain-item .right span {
        font-size: 16.5px !important;
        color: #b0562e !important;
        white-space: nowrap;
        font-weight: normal;
    }
}

/* --- Praegune pubi valikus: kuldne aar --- */
@media screen and (max-width: 1023px) {
    .cm-pubs-row a.cm-pub-current {
        border-color: #d9b968;
        background: rgba(217, 185, 104, 0.14);
    }
}

/* --- Topeltlogo (.pt-content-logo) peitmine: paiseriba naitab logo juba ise --- */
@media screen and (max-width: 1023px) {
    .pt-content-logo {
        display: none !important;
    }
}
