/*
Theme Name: Alantra
Theme URI: https://theoffice.ie/
Author: TheOffice.ie
Description: Alantra's editable WordPress theme, based on the approved staging design.
Version: 1.0.1
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: alantra
*/

/* New WordPress blocks inherit the Alantra rhythm without altering the migrated pages. */
.alantra-new-page .entry-content { max-width: 800px; margin-inline: auto; }
.alantra-new-page .entry-content > * + * { margin-block-start: 1.2em; }
.alantra-new-page .entry-content img { max-width: 100%; height: auto; }
.alantra-plugin-form label { display: block; }
.alantra-plugin-form input:not([type="submit"]),
.alantra-plugin-form textarea,
.alantra-plugin-form select { max-width: 100%; width: 100%; }
.alantra-plugin-form button,
.alantra-plugin-form input[type="submit"] { background: #52cd24; color: white; border: 0; padding: .65em 1.5em; cursor: pointer; }
.alantra-form-note { font-size: .9rem; padding: 1em; border-left: 4px solid #52cd24; }

/* Alantra 1.0.1 — mobile layout and contact navigation fixes.
 * Shared legacy pages are stored in the WordPress database: these overrides
 * apply without re-importing or altering the original catalogue content.
 */
:where(#content, #footerContent) a[href^="mailto:"] {
  overflow-wrap: anywhere;
  word-break: normal;
}
#footerContent .alantra-footer-action a { display: inline; }
#footerContent .alantra-footer-action a[href^="tel:"],
#footerContent .alantra-footer-action a[href^="https://wa.me/"] {
  text-underline-offset: 2px;
}
#footerContent .alantra-footer-action .wFlex > * { min-width: 0; }
#footerContent .iconRow .webeditText { overflow-wrap: anywhere; }
#footerContent .alantra-footer-whatsapp svg { display: inline-block; float: none; vertical-align: middle; }
.alantra-home-whatsapp { display: block; margin-top: .5rem; }
#content .alantra-contact-form { box-sizing: border-box; min-width: 0; width: 100%; }
#content .alantra-contact-form form { width: 100%; max-width: 100%; min-width: 0; }
#content .alantra-contact-form form > p { margin: 0 0 1rem; min-width: 0; width: 100%; }
#content .alantra-contact-form label { display: block; margin-bottom: .3rem; }
#content .alantra-contact-form input:not([type="hidden"]),
#content .alantra-contact-form textarea,
#content .alantra-contact-form select { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; }
#content .alantra-contact-form textarea { min-height: 145px; }
#content .alantra-contact-form button { min-height: 44px; padding: .7rem 1.25rem; }
#content .alantra-contact-form :is(input, textarea, button):focus-visible,
#footerContent a:focus-visible,
#nav a:focus-visible { outline: 2px solid #277609; outline-offset: 3px; }

@media screen and (max-width: 1023px) {
  /* Long menu labels must not be clipped inside the original slide-out menu. */
  #wMenuIcon { min-width: 50px; min-height: 50px; }
  .w-menu-with-icon [role="menuitem"] {
    white-space: normal !important;
    overflow-wrap: break-word;
    min-height: 48px;
  }
}
@media screen and (max-width: 767px) {
  /* Legacy fixed padding created a very narrow help/contact column at 320-390px. */
  .alantra-home-page #content .wPadding0-30,
  .alantra-contact-page #content .wPadding0-30 { padding-left: 16px !important; padding-right: 16px !important; }
  .alantra-home-page #content .equalHeightContent,
  .alantra-contact-page #content .equalHeightContent,
  .alantra-home-page #content .equalHeightMedia,
  .alantra-contact-page #content .equalHeightMedia { width: 100%; min-width: 0; }
  .alantra-home-page #content .equalHeightContent > div[style*="padding:30px"],
  .alantra-contact-page #content .equalHeightContent > div[style*="padding:30px"] { padding: 12px !important; }
  .alantra-home-page #content .wColourblock.w-background-8,
  .alantra-contact-page #content .wColourblock.w-background-8 { padding: 14px !important; }
  .alantra-home-page #content .wColourblock .webeditText,
  .alantra-contact-page #content .wColourblock .webeditText { overflow-wrap: anywhere; }
  .alantra-home-page #content .iconRow .wFlex,
  .alantra-contact-page #content .iconRow .wFlex,
  #footerContent .iconRow .wFlex {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-right: 0;
  }
  .alantra-home-page #content .iconRow .wFlex > *,
  .alantra-contact-page #content .iconRow .wFlex > *,
  #footerContent .iconRow .wFlex > * {
    margin-right: 0;
    min-width: 0;
    width: auto;
  }
  #footerContent .wSpan60Xs,
  #footerContent .wSpan60S { min-width: 0; }
  #footerContent .iconRow .webeditText > div { overflow-wrap: anywhere; }
  #footerContent .alantra-footer-action { margin-bottom: .45rem; }
  #content .alantra-contact-form button { max-width: 100%; }
  /* Product specification tables remain usable rather than stretching the viewport. */
  #content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #content .webeditText img,
  #content .wColourblock img { max-width: 100%; height: auto; }
  #w-cookies-notice {
    box-sizing: border-box;
    padding: 12px 16px !important;
    max-height: 55svh;
    overflow-y: auto;
    font: 14px/1.4 sans-serif;
  }
  #w-cookies-accept { width: min(100%, 280px); margin: 10px auto; font-size: 15px; }
  #w-cookies-notice > div { gap: 8px; flex-wrap: wrap; }
  #w-cookies-notice > div > :is(a, span) { min-width: 118px; }
}
@media screen and (max-width: 480px) {
  .alantra-home-page .webeditText .s72,
  .alantra-contact-page .webeditText .s72,
  .alantra-home-page .webeditText .s60,
  .alantra-contact-page .webeditText .s60 { font-size: clamp(27px, 7.5vw, 34px) !important; line-height: 1.12; }
}
