/*
Theme Name: Kcherouvim
Description: Child theme of Twenty Twenty-Five
Author: Kcherouvim
Template: twentytwentyfive
Version: 1.0.0
*/

/* ========================================
   Theme Variables
   ======================================== */
:root {
    --theme-primary: #22424f;
}

/* ========================================
   Global - Fix bold weight with light base font
   ======================================== */
strong, b {
    font-weight: 700;
}

/* ========================================
   Homepage - Remove footer margin
   ======================================== */
footer.wp-block-template-part,
.wp-site-blocks > main {
    margin-block-start: 0 !important;
}

/* ========================================
   Footer - Shortcode link styling
   ======================================== */
.tlink {
    margin: 0;
}
.tlink a {
    text-decoration: none;
}

/* ========================================
   Footer - Newsletter signup bar
   ======================================== */
.footer-newsletter {
    background-color: #8199A5;
    padding: 24px clamp(20px, 5vw, 100px);
}
.footer-newsletter__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-newsletter__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}
.footer-newsletter__icon {
    width: 87px;
    height: 87px;
    object-fit: contain;
}
.footer-newsletter__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.footer-newsletter__title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    white-space: nowrap;
}
.footer-newsletter__subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}
.footer-newsletter__right {
    flex: 1;
    max-width: 500px;
}
.footer-newsletter__right .wpcf7-form {
    display: flex;
    align-items: center;
    gap: 0;
}
.footer-newsletter__right .wpcf7-form p {
    margin: 0;
    display: contents;
}
.footer-newsletter__right .wpcf7-form input[type="email"],
.footer-newsletter__right .wpcf7-form input[type="text"] {
    flex: 1;
    height: 48px;
    padding: 0 16px;
    border: none;
    border-radius: 0;
    font-size: 15px;
    outline: none;
    min-width: 0;
}
.footer-newsletter__right .wpcf7-form input[type="submit"] {
    height: 48px;
    padding: 0 24px;
    background-color: #22424f;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.footer-newsletter__right .wpcf7-form input[type="submit"]:hover {
    background-color: #1a3540;
}
.footer-newsletter__right .wpcf7-form .wpcf7-response-output {
    margin: 0;
    padding: 8px 0 0;
    border: none;
    color: #ffffff;
    font-size: 13px;
}
.footer-newsletter__right .wpcf7-form .wpcf7-spinner {
    display: none;
}
/* Loading state */
.footer-newsletter__right .wpcf7-form.submitting input[type="submit"] {
    animation: newsletter-loading 1s ease-in-out infinite;
    pointer-events: none;
    cursor: wait;
}
.footer-newsletter__right .wpcf7-form.submitting .wpcf7-spinner {
    display: inline-block !important;
    visibility: visible !important;
    background-color: #ffffff;
    margin: 0 0 0 12px;
}
@keyframes newsletter-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
/* Success state */
.footer-newsletter__right .wpcf7-form.sent input[type="email"],
.footer-newsletter__right .wpcf7-form.sent input[type="text"],
.footer-newsletter__right .wpcf7-form.sent input[type="submit"],
.footer-newsletter__right .wpcf7-form.sent .wpcf7-spinner {
    display: none !important;
}
.footer-newsletter__right .wpcf7-form.sent .wpcf7-response-output {
    font-size: 16px;
    padding: 12px 20px;
    background-color: #2e7d32;
    border-radius: 4px;
}
/* Invalid state */
.footer-newsletter__right .wpcf7-form.invalid .wpcf7-response-output {
    display: none;
}
.footer-newsletter__right .wpcf7-form.invalid .wpcf7-not-valid-tip {
    color: #ffffff;
    background-color: #c62828;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 4px;
}
@media (max-width: 1200px) {
    .footer-newsletter {
        padding: 24px 20px;
    }
    .footer-newsletter__inner {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .footer-newsletter__left {
        justify-content: center;
    }
    .footer-newsletter__right {
        max-width: 500px;
        width: 100%;
    }
    .footer-newsletter__right .wpcf7-form {
        gap: 8px;
    }
    .footer-newsletter__right .wpcf7-form .wpcf7-form-control-wrap,
    .footer-newsletter__right .wpcf7-form .wpcf7-form-control-wrap input {
        width: 100%;
        box-sizing: border-box;
    }
    .footer-newsletter__right .wpcf7-form input[type="submit"] {
        box-sizing: border-box;
    }
}
@media (max-width: 767px) {
    /* Full-width stacked on mobile */
    .footer-newsletter__right .wpcf7-form {
        flex-wrap: wrap;
    }
    .footer-newsletter__right .wpcf7-form input[type="submit"] {
        width: 100%;
    }
}

/* ========================================
   Footer - Company info
   ======================================== */
.footer-company-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.footer-company-info__address {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

/* ========================================
   Footer - Benefits section
   ======================================== */
.footer-benefits {
    margin-bottom: 32px;
}
.footer-benefits__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.footer-benefits__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.footer-benefits__item img {
    height: 95px;
    width: auto;
    object-fit: contain;
}
.footer-benefits__item span {
    font-size: 18px;
    line-height: 1.4;
    color: #ffffff;
}
.footer-benefits__separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin: 32px 0 0;
}
@media (max-width: 768px) {
    .footer-benefits__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

/* ========================================
   Footer CTA Buttons
   ======================================== */
.footer-cta-buttons {
    margin: 60px 0;
}
.footer-cta-buttons__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer-cta-buttons__inner .catalogue-download-button {
    border-radius: 0;
}
.footer-cta-button-apply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 18px 24px;
    background-color: #8199A5;
    color: #fff !important;
    text-decoration: none;
    border: none;
    border-radius: 0;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.footer-cta-button-apply:hover,
.footer-cta-button-apply:focus {
    background-color: #6e8591;
    color: #fff;
    text-decoration: none;
}

/* ========================================
   WooCommerce Blocks - Button Styles
   ======================================== */

/* Primary action buttons (Cart, Checkout, Place Order) — Red */
.wc-block-components-button.contained:not(.wc-block-components-drawer__close),
.wc-block-cart__submit-button,
.wc-block-checkout__actions_row .wc-block-components-button,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button,
.wc-block-mini-cart__footer-checkout,
.wp-block-woocommerce-checkout-place-order-block .wc-block-components-button {
    background-color: #22424f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease !important;
}

.wc-block-components-button.contained:not(.wc-block-components-drawer__close):hover,
.wc-block-cart__submit-button:hover,
.wc-block-checkout__actions_row .wc-block-components-button:hover,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button:hover,
.wc-block-mini-cart__footer-checkout:hover,
.wp-block-woocommerce-checkout-place-order-block .wc-block-components-button:hover {
    background-color: #1b3540 !important;
    color: #fff !important;
}

/* Single product Add to Cart button — Teal */
.single_add_to_cart_button {
    background-color: #3d7b80 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease !important;
}

.single_add_to_cart_button:hover {
    background-color: #2d5a5e !important;
    color: #fff !important;
}

/* Mini-cart view cart link (secondary action) */
.wc-block-mini-cart__footer-cart {
    background-color: transparent !important;
    color: #22424f !important;
    border: 2px solid #22424f !important;
    border-radius: 4px !important;
    padding: 10px 22px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.wc-block-mini-cart__footer-cart:hover {
    background-color: #22424f !important;
    color: #fff !important;
}

/* Button text styling */
.wc-block-components-button__text {
    font-weight: inherit !important;
}

/* Fix WooCommerce Blocks quantity selector +/- buttons */
/* The fullwidth plus/minus (U+FF0B/U+FF0D) don't render in Manrope font */
.wc-block-components-quantity-selector__button--plus,
.wc-block-components-quantity-selector__button--minus {
    color: transparent !important;
    position: relative;
}

.wc-block-components-quantity-selector__button--plus::before,
.wc-block-components-quantity-selector__button--minus::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
}

.wc-block-components-quantity-selector__button--plus::before {
    content: '+';
}

.wc-block-components-quantity-selector__button--minus::before {
    content: '−';
}

/* Traffic light colors */
.stock-green { color: #28a745; }
.stock-yellow { color: #ffc107; }
.stock-red { color: #dc3545; }

/* Cart/Checkout notices */
.stock-notice {
    color: #ff9800;
    font-style: italic;
}

/* ========================================
   B2B Company Details Page
   ======================================== */

.erp-company-details {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.erp-company-details h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #333;
}

.erp-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #fff;
}

.erp-details-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.erp-details-table tbody tr:last-child {
    border-bottom: none;
}

.erp-details-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 400;
    color: #666;
    width: 40%;
    background: #f8f9fa;
}

.erp-details-table td {
    padding: 12px 16px;
    color: #333;
    font-weight: 500;
}

/* Addresses Section */
.addresses-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.addresses-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.address-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.address-card {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 5px;
    background: #fff;
}

.address-card .address-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #22424f;
}

.address-card .address-details {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.address-card .address-line {
    display: block;
}

/* Salesperson Section - Highlighted */
.salesperson-section {
    margin-top: 40px;
}

.salesperson-section .erp-details-table {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

.salesperson-section .erp-details-table th {
    background: #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .erp-details-table th,
    .erp-details-table td {
        display: block;
        width: 100%;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    .erp-details-table th {
        background: #f0f0f0;
        font-weight: 600;
        padding-top: 12px;
        padding-bottom: 4px;
    }

    .erp-details-table td {
        padding-top: 4px;
        padding-bottom: 12px;
        border-bottom: none;
    }

    .erp-details-table tbody tr {
        border-bottom: 2px solid #e0e0e0;
        margin-bottom: 10px;
    }
}

/* Accounting Page Styles */
.accounting-page {
    padding: 20px 0;
}

.accounting-section {
    margin-bottom: 30px;
}

.accounting-section-header,
.woocommerce-MyAccount-content h3.accounting-section-header {
    background: #22424f;
    color: #fff;
    padding: 12px 20px;
    margin: 0 0 0 0;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px 4px 0 0;
}

/* Sales Statistics Grid */
.accounting-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.stat-item:nth-child(odd) {
    border-right: 1px solid #e0e0e0;
}

.stat-item:nth-last-child(2),
.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.stat-label-period {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    margin-top: 2px;
}

.stat-value {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

/* Payment & Shipping Methods Table */
.accounting-methods-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.accounting-methods-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.accounting-methods-table tbody tr:last-child {
    border-bottom: none;
}

.accounting-methods-table th {
    text-align: left;
    padding: 12px 20px;
    font-weight: 400;
    color: #666;
    width: 50%;
    background: #f8f9fa;
}

.accounting-methods-table td {
    padding: 12px 20px;
    color: #333;
    font-weight: 500;
}

/* Responsive Design for Accounting Page */
@media (max-width: 768px) {
    .accounting-stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item:nth-child(odd) {
        border-right: none;
    }

    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .accounting-methods-table th,
    .accounting-methods-table td {
        display: block;
        width: 100%;
        padding: 8px 12px;
        box-sizing: border-box;
    }

    .accounting-methods-table th {
        background: #f0f0f0;
        font-weight: 600;
        padding-top: 12px;
        padding-bottom: 4px;
    }

    .accounting-methods-table td {
        padding-top: 4px;
        padding-bottom: 12px;
    }
}

/* ========================================
   My Account Page - Full Width Layout
   ======================================== */

/* Hide page title on account pages */
.woocommerce-account .wp-block-post-title {
    display: none;
}

/* Reduce top padding on account pages */
.woocommerce-account main > .wp-block-group.alignfull {
    padding-top: var(--wp--preset--spacing--20) !important;
}

/* Override WordPress block theme width constraints for account pages - scoped to main content */
.woocommerce-account .woocommerce,
.woocommerce-account main > .wp-block-group,
.woocommerce-account main,
.woocommerce-account .wp-site-blocks > main {
    max-width: none !important;
    width: 100% !important;
}

.woocommerce-account main .wp-block-group__inner-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Account Wrapper - Full Width Container */
.woocommerce-account-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Navigation Sidebar */
.woocommerce-MyAccount-navigation {
    flex: 0 0 250px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Navigation Menu */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
    margin: 0;
    padding: 0 !important;
    border-bottom: 1px solid #e0e0e0;
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: #f8f9fa;
    color: #22424f;
    padding-left: 25px;
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li a[aria-current="page"] {
    background: #22424f;
    color: #fff;
    font-weight: 600;
}

.woocommerce-MyAccount-navigation ul li.is-active a:hover {
    background: #1b3540;
    padding-left: 20px;
}

/* Account Content Area */
.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    margin-top: 0;
    color: #333;
}

/* Responsive Design - Mobile and Tablet */
@media (max-width: 900px) {
    /* Stack layout on mobile */
    .woocommerce-account-wrapper {
        flex-direction: column;
        padding: 20px 15px;
        gap: 20px;
    }

    /* Hide navigation sidebar on mobile - users access via avatar block */
    .woocommerce-MyAccount-navigation {
        display: none;
    }

    /* Full width content on mobile */
    .woocommerce-MyAccount-content {
        flex: 1;
        padding: 20px;
        width: 100% !important;
        float: none !important;
    }
}

/* Desktop adjustments for narrower screens */
@media (min-width: 901px) and (max-width: 1100px) {
    .woocommerce-account-wrapper {
        gap: 20px;
        padding: 30px 20px;
    }

    .woocommerce-MyAccount-navigation {
        flex: 0 0 200px;
    }

    .woocommerce-MyAccount-content {
        padding: 25px;
    }
}

/* ========================================
   Sticky Footer - Push footer to bottom
   ======================================== */

/* Make the site fill at least the full viewport height */
.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make main content expand to fill available space */
.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group[class*="wp-block-group"]:not(.wp-block-template-part):first-of-type ~ .wp-block-group:not(.wp-block-template-part):not(:last-child) {
    flex-grow: 1;
}

/* Target the main element specifically */
.wp-site-blocks > main.wp-block-group {
    flex-grow: 1;
}

/* ========================================
   Contact Form 7 - Styled Contact Form
   ======================================== */

.ContactForm {
    width: 100%;
}

.ContactForm .RedTitle {
    color: #22424f;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.ContactForm .Form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Two-column row layout */
.ContactForm .flex-column {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.ContactForm .flex-column.equal-width {
    width: 100%;
}

.ContactForm .flex-block {
    flex: 1;
    min-width: 0;
}

.ContactForm .flex-block-full-width {
    flex: 1;
    width: 100%;
}

/* Floating label input container */
.ContactForm .flex-input {
    position: relative;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    background: #fff;
}

/* Remove double borders between adjacent cells */
.ContactForm .flex-column .flex-block:not(:first-child) .flex-input {
    border-left: none;
}

.ContactForm .flex-column:not(:first-child) .flex-input {
    border-top: none;
}

.ContactForm .flex-input.notes-field {
    border-top: none;
}

/* Input fields - target CF7's wrapper structure */
.ContactForm .flex-input input[type="text"],
.ContactForm .flex-input input[type="email"],
.ContactForm .flex-input input[type="tel"],
.ContactForm .flex-input select,
.ContactForm .flex-input textarea {
    width: 100%;
    padding: 24px 15px 10px 15px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #333;
    outline: none;
    box-sizing: border-box;
}

.ContactForm .flex-input input:focus,
.ContactForm .flex-input select:focus,
.ContactForm .flex-input textarea:focus {
    outline: none;
}

/* CF7 wrapper span should not affect layout */
.ContactForm .flex-input .wpcf7-form-control-wrap {
    display: block;
}

/* Floating labels - positioned at top always (simpler approach) */
.ContactForm .flex-input > label {
    position: absolute;
    left: 15px;
    top: 8px;
    font-size: 0.75rem;
    color: #666;
    pointer-events: none;
    background: transparent;
    padding: 0;
    margin: 0;
    z-index: 1;
}

/* Select dropdown styling */
.ContactForm .flex-input select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 35px;
}

/* Select dropdown arrow */
.ContactForm .flex-input.select::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #666;
    pointer-events: none;
}

/* Textarea styling */
.ContactForm .flex-input textarea {
    resize: vertical;
    min-height: 120px;
}

/* Optional tag */
.ContactForm .flex-input .optional-tag {
    position: absolute;
    right: 15px;
    top: 8px;
    font-size: 0.75rem;
    color: #999;
}

/* Checkbox styling */
.ContactForm .checkout {
    margin: 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ContactForm .checkout .wpcf7-form-control-wrap {
    display: block;
}

.ContactForm .checkout .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ContactForm .checkout input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0 0;
    flex-shrink: 0;
    accent-color: #22424f;
}

.ContactForm .checkout .wpcf7-list-item-label {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

/* Submit button */
.ContactForm .ContactAction {
    margin-top: 10px;
}

.ContactForm .ContactAction input[type="submit"] {
    background-color: #22424f;
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ContactForm .ContactAction input[type="submit"]:hover {
    background-color: #1b3540;
}

/* Hide CF7 spinner next to submit */
.ContactForm .wpcf7-spinner {
    display: none;
}

/* Validation styling */
.ContactForm .wpcf7-not-valid-tip {
    color: #22424f;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
}

.ContactForm .wpcf7-not-valid {
    border-color: #22424f !important;
}

/* Response messages */
.ContactForm .wpcf7-response-output {
    margin: 15px 0 0 0;
    padding: 10px 15px;
    border-radius: 4px;
}

.ContactForm .wpcf7-mail-sent-ok {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.ContactForm .wpcf7-validation-errors {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 600px) {
    .ContactForm .flex-column {
        flex-direction: column;
    }

    .ContactForm .flex-block {
        width: 100%;
    }

    .ContactForm .flex-column .flex-block:not(:first-child) .flex-input {
        border-left: 1px solid #e0e0e0;
        border-top: none;
    }
}

/* ========================================
   Responsive Header & Footer
   ======================================== */

/* Responsive footer padding - overrides inline 100px with fluid scaling */
.footer-main {
    padding-left: clamp(20px, 5vw, 100px) !important;
    padding-right: clamp(20px, 5vw, 100px) !important;
}

/* Footer phone buttons - override inline 280px, respect column width */
.footer-main .wp-block-column:first-child a[href^="tel:"] {
    width: 100% !important;
    max-width: 280px;
}

/* Mobile search icon - hidden on desktop */
.header-mobile-search {
    display: none;
}

/* Always show initials, never fullname */
.user-name-label {
    display: none !important;
}

.user-initials-label {
    display: inline !important;
    font-size: 12px;
}

/* Inline nav in header-main - visible above 1400px */
.header-nav-inline {
    flex: 1;
    justify-content: center;
}

/* --- Tablet/Narrow desktop: max-width 1400px --- */
@media (max-width: 1400px) {

    /* Hide tagline - overlaps phone numbers */
    .header-tagline {
        display: none !important;
    }

    /* Hide megamenu label */
    .megamenu-label {
        display: none !important;
    }

    /* Shrink logo and prevent it from being crushed by flex */
    .header-main .wp-block-image img {
        width: 200px !important;
    }

    .header-main > .wp-block-group:first-child {
        flex-shrink: 0 !important;
    }

    /* Hide inline nav links - available via megamenu sidebar */
    .header-nav-inline {
        display: none !important;
    }

    /* Constrain search bar */
    .header-search-wrapper {
        max-width: 500px;
    }

}

/* --- Footer 2x2 grid: 768-1200px --- */
@media (max-width: 1200px) and (min-width: 768px) {
    .footer-main .wp-block-columns {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    /* Fixed-width phone buttons */
    .footer-main .wp-block-column:first-child a[href^="tel:"] {
        width: 280px !important;
    }
}

/* --- Mobile: max-width 767px --- */
@media (max-width: 767px) {
    /* Prevent horizontal overflow from off-screen drawers */
    html, body {
        overflow-x: hidden !important;
    }

    /* Hide entire top bar */
    .header-topbar {
        display: none !important;
    }

    /* Hide megamenu label - just show hamburger icon */
    .megamenu-label {
        display: none !important;
    }

    /* Catalogue: icon-only on mobile (hide text label) */
    .header-controls .catalogue-download-button span {
        display: none !important;
    }

    .header-controls .catalogue-download-button {
        padding: 6px !important;
    }

    /* Fix newsletter title overflow on mobile */
    .footer-newsletter__title {
        white-space: normal !important;
        font-size: 20px;
    }

    /* Hide mobile search icon from header controls (search moves to navbar) */
    .header-mobile-search {
        display: none !important;
    }

    /* Show search bar in navbar row on mobile */
    .header-search-wrapper {
        display: flex !important;
        flex: 1 !important;
        max-width: none !important;
        min-width: 0 !important;
        overflow: hidden;
    }

    /* Shrink logo */
    .header-main .wp-block-image img {
        width: 150px !important;
    }

    /* Footer: stack CTA buttons full-width */
    .footer-cta-buttons {
        margin: 32px 0;
    }

    .footer-cta-buttons__inner {
        flex-direction: column;
    }

    .footer-cta-buttons__inner .catalogue-download-button,
    .footer-cta-button-apply {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
        text-align: center;
    }

    /* Footer: phone buttons on mobile */
    .footer-main .wp-block-column:first-child a[href^="tel:"] {
        width: 240px !important;
        max-width: 100%;
    }

    /* Footer: stack columns */
    .footer-main .wp-block-columns {
        flex-direction: column !important;
    }
}

/* --- Small Mobile: max-width 480px --- */
@media (max-width: 480px) {
    /* Hide catalogue download entirely on smallest screens */
    .header-controls .catalogue-download-button {
        display: none !important;
    }

    /* Hide price toggler on smallest screens */
    .header-controls .price-display-block-container {
        display: none !important;
    }

    /* Smallest logo */
    .header-main .wp-block-image img {
        width: 120px !important;
    }

    /* Smaller footer benefit icons */
    .footer-benefits__item img {
        height: 60px;
    }

    .footer-benefits__item span {
        font-size: 14px;
    }

    /* Smaller CTA buttons */
    .footer-cta-button-apply {
        font-size: 16px;
        padding: 14px 20px;
    }

    .footer-cta-buttons__inner .catalogue-download-button {
        font-size: 16px !important;
        padding: 14px 20px !important;
    }
}

