/*
 * TTC Mobile Layout Refinements 1.0.3
 * Tested in an isolated Playwright browser preview on 390x844 and 844x390.
 * Does not suppress, bypass, or automatically choose consent preferences.
 * Scoped to mobile screens. Disable plugin to roll back these declarations.
 */

/* Compact Complianz banner on narrow portrait screens. */
@media (max-width:600px) {
  html body .cmplz-cookiebanner {
    min-width:0!important;
    max-width:100vw!important;
    width:100vw!important;
    padding:14px 16px!important;
    border-radius:12px 12px 0 0!important;
    max-height:min(70svh,470px)!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    box-sizing:border-box!important;
  }
  html body .cmplz-cookiebanner .cmplz-message {
    margin-bottom:9px!important;
    line-height:1.4!important;
    font-size:13px!important;
  }
  html body .cmplz-cookiebanner .cmplz-message p {
    margin:0!important;
    padding:0!important;
    line-height:1.4!important;
  }
  /* Two explicit rows prevent Divi/Complianz inherited grid placement
     from stretching View preferences to the combined height of both rows. */
  html body .cmplz-cookiebanner .cmplz-buttons {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:44px 44px!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:8px!important;
    margin-top:8px!important;
    width:100%!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    height:44px!important;
    padding:8px!important;
    margin:0!important;
    font-size:13px!important;
    line-height:1.25!important;
    grid-area:auto!important;
    box-sizing:border-box!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-accept {
    grid-area:1 / 1 / 2 / 2!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-deny {
    grid-area:1 / 2 / 2 / 3!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-view-preferences {
    grid-area:2 / 1 / 3 / 3!important;
  }
}

/* Keep all cookie choices usable on a short landscape screen. */
@media (orientation:landscape) and (min-width:601px) and (max-width:980px) and (max-height:500px) {
  html body .cmplz-cookiebanner {
    width:min(570px,calc(100vw - 28px))!important;
    max-height:calc(100svh - 20px)!important;
    overflow-y:auto!important;
    padding:12px 16px!important;
    box-sizing:border-box!important;
  }
  html body .cmplz-cookiebanner .cmplz-message {
    font-size:13px!important;
    line-height:1.35!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons {
    display:flex!important;
    flex-direction:row!important;
    gap:8px!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    min-width:0!important;
    min-height:44px!important;
    padding:8px!important;
    font-size:13px!important;
  }
}

/* About hero: preserve text, keep face visible, avoid a 529px tall hero in landscape. */
@media (orientation:landscape) and (min-width:681px) and (max-width:980px) and (max-height:500px) {
  html body.page-id-11271 #page-container #main-content .et_pb_section.ttc-about-hero {
    display:flex!important;
    align-items:center!important;
    min-height:0!important;
    height:auto!important;
    padding:20px 0!important;
    background-color:#142b3e!important;
    background-image:linear-gradient(90deg,#142b3e 0%,rgba(20,43,62,.99) 27%,rgba(20,43,62,.91) 49%,rgba(20,43,62,.21) 73%,rgba(20,43,62,0) 100%),url("https://thetalentcompany.ch/wp-content/uploads/Relaxed-About_2.png")!important;
    background-size:100% 100%,auto 113%!important;
    background-position:center,right center!important;
    background-repeat:no-repeat!important;
    isolation:isolate!important;
  }
  html body.page-id-11271 #page-container #main-content .et_pb_section.ttc-about-hero::before,
  html body.page-id-11271 #page-container #main-content .et_pb_section.ttc-about-hero::after {
    content:none!important;
    display:none!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-hero-row {
    display:block!important;
    width:91%!important;
    min-height:0!important;
    padding:0!important;
    margin:0 auto!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-hero-row>.et_pb_column:first-child {
    display:block!important;
    width:51%!important;
    max-width:480px!important;
    padding:0 14px 0 0!important;
    margin:0!important;
    float:none!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-eyebrow {
    margin:0 0 7px!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-eyebrow p {
    font-size:12px!important;
    line-height:1.25!important;
    margin:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-hero-title {
    margin:0 0 9px!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero h1,
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .et_pb_heading h1 {
    font-size:clamp(21px,2.8vw,25px)!important;
    line-height:1.12!important;
    margin:0!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-hero-copy {
    margin:0!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-hero-copy p {
    font-size:13px!important;
    line-height:1.4!important;
    margin:0 0 7px!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-signature {
    margin:6px 0 0!important;
    padding:0!important;
  }
  html body.page-id-11271 #page-container #main-content .ttc-about-hero .ttc-about-signature p {
    font-size:11px!important;
    line-height:1.3!important;
    margin:0!important;
  }
}

/* TTC 1.0.1: Explicitly place the three consent actions in two compact rows.
 * Fixes a Complianz grid auto-placement interaction observed in live production.
 * These declarations change presentation only, not consent categories or decisions.
 */
@media (max-width:600px) {
  html body .cmplz-cookiebanner .cmplz-buttons {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:44px 44px!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:8px!important;
    grid-area:auto!important;
    box-sizing:border-box!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-accept {
    grid-area:1/1/2/2!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-deny {
    grid-area:1/2/2/3!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-view-preferences,
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-save-preferences {
    grid-area:2/1/3/3!important;
  }
}

/* TTC 1.0.4: Home tablet portrait avoids text crossing portrait. */
@media screen and (orientation:portrait) and (min-width:700px) and (max-width:980px) {
  html body.page-id-11394 #page-container .ttch-hero .ttch-row > .ttch-copy {
    width:47%!important;
    max-width:47%!important;
    flex:0 0 47%!important;
    min-width:0!important;
  }
  html body.page-id-11394 #page-container .ttch-hero .ttch-title h1 {
    font-size:clamp(25px,3.7vw,30px)!important;
    line-height:1.15!important;
    max-width:100%!important;
  }
  html body.page-id-11394 #page-container .ttch-hero .ttch-intro,
  html body.page-id-11394 #page-container .ttch-hero .ttch-intro p {
    max-width:100%!important;
    font-size:clamp(14px,1.85vw,16px)!important;
    line-height:1.5!important;
  }
  html body.page-id-11394 #page-container .ttch-hero .ttch-row {
    min-height:345px!important;
  }
}
/* TTC 1.0.4: Compact Safari iPhone landscape consent with full-size touch targets. */
@media screen and (orientation:landscape) and (min-width:700px) and (max-width:980px) and (max-height:500px) {
  html body .cmplz-cookiebanner {
    display:grid!important;
    transform:none!important;
    zoom:1!important;
    transform-origin:bottom right!important;
    right:12px!important;
    bottom:8px!important;
    width:min(530px,calc(100vw - 24px))!important;
    max-width:min(530px,calc(100vw - 24px))!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 16px)!important;
    padding:10px 14px!important;
    gap:5px!important;
    overflow-y:auto!important;
    box-sizing:border-box!important;
  }
  html body .cmplz-cookiebanner .cmplz-header {
    margin:0!important;
    padding:0!important;
    min-height:0!important;
  }
  html body .cmplz-cookiebanner .cmplz-message,
  html body .cmplz-cookiebanner .cmplz-message p {
    margin:0!important;
    padding:0!important;
    font-size:12px!important;
    line-height:1.28!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons {
    zoom:1!important;
    transform:none!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:44px!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:6px!important;
    width:100%!important;
    margin:0!important;
    padding:0!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    zoom:1!important;
    transform:none!important;
    min-width:0!important;
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
    margin:0!important;
    padding:6px!important;
    box-sizing:border-box!important;
    grid-area:auto!important;
    align-self:stretch!important;
    font-size:12px!important;
    line-height:1.18!important;
  }
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-accept {grid-area:1/1/2/2!important;}
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-deny {grid-area:1/2/2/3!important;}
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-view-preferences,
  html body .cmplz-cookiebanner .cmplz-buttons .cmplz-save-preferences {grid-area:1/3/2/4!important;}
}
