/*

Theme Name: McCann Ellis Law
Template: wpbt-core
Author: Justin Krauss
Description: The default theme for McCann Ellis Law.
Version: 1.0.0
Requires: 6.8
Tested up to: 6.8
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mccannellislaw

*/

textarea {
    resize: none !important;
}

/* Custom contact form styling - "Base styling only" should be selected in WPForms > Settings > General */
.wpforms-form .wpforms-field {
    padding-top: 0;
}

.wpforms-form .wpforms-field-label {
    padding-bottom: 10px;
}

.wpforms-form .wpforms-field-label .wpforms-required-label {
    color: #D63637;
}

.wpforms-form input {
    width: 100%!important;
    max-width: 100%!important;
    box-sizing: border-box;
}

.wpforms-form .wpforms-field-container input,
.wpforms-form .wpforms-field-container textarea {
    font-size: 1rem;
    padding: 10px;
    border: 1px solid #eeeff0;
    border-bottom: 1px solid #cacaca;
    width: 100%;
}

.wpforms-form .wpforms-submit-container .wpforms-submit {
    font-size: var(--wp--preset--font-size--medium);
    font-family: var(--wp--preset--font-family--dm-sans);
    font-weight: 600;
    color: var(--wp--preset--color--base);
    background: var(--wp--preset--color--accent-1);
    margin-top: var(--wp--preset--spacing--30);
    margin-bottom: var(--wp--preset--spacing--30);
    padding: 14px 20px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.wpforms-form .wpforms-submit-container .wpforms-submit:hover {
    background: var(--wp--preset--color--accent-2);
}

/* Fixes Safari auto-linked phone number color */
a[href^="tel"] {
	color: inherit !important;
	text-decoration: none !important;
}

/* Extra Safari-specific fallback */
a[x-apple-data-detectors] {
	color inherit !important;
	text-decoration: none !important;
}

/* Changes the margin and padding on the header navigation for desktop without having to unsync block from the footer */
.wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
    margin: 0 10px;
    padding: 0;
}

/* Styling for the Search block inside of <main> group (only applicable to the 404 page) */
main .wp-block-search__input {
    background: #fff;
    border: 1px solid #cacaca;
}

main .wp-block-search__button {
    background-color: var(--wp--preset--color--contrast);
    border: 1px solid var(--wp--preset--color--contrast);
}

main .wp-block-search__button:hover {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
}

/* Allows for text wrapping on the Employee singles pages. Custom class is applied to the Group block containing Featured Image and Content blocks. */
@media screen and (min-width: 48rem) {
    .has-wrapped-featured-image {
        overflow: visible;
    }

    .has-wrapped-featured-image::after {
        content: "";
        display: block;
        clear: both;
    }

    .has-wrapped-featured-image .wp-block-post-featured-image {
        float: left;
        margin: 0 35px 25px 0!important;
        max-width: 40%;
    }

    .has-wrapped-featured-image .wp-post-block-content,
    .has-wrapped-featured-image .entry-content {
        display: block;
        overflow: visible;
    }

    .has-wrapped-featured-image .wp-block-post-content > * {
        clear: none;
    }
}

/* Responsive grid layout for the Employees section on the home page */
.home ul.wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media screen and (min-width: 48rem) {
    .home ul.wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media screen and (min-width: 62rem) {
    .home ul.wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

/* Responsive grid layout for the Employees archive page */
.post-type-archive-employees ul.wp-block-post-template.is-layout-grid {
    grid-template-columns: 1fr !important;
}

@media screen and (min-width: 36rem) {
    .post-type-archive-employees ul.wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media screen and (min-width: 48rem) {
    .post-type-archive-employees ul.wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Adds margin to the top of submenus on horizontal layout */
@media screen and (min-width: 36rem) {
    header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-link:first-of-type {
        margin-top: 35px !important;
    }
}

/* Hides submenus in footer navigation */
footer .wp-block-navigation .wp-block-navigation__submenu-container,
footer .wp-block-navigation .wp-block-navigation__submenu-icon {
    display: none !important;
}

/* Styling for the footer disclaimer */
.footer-disclaimer {
    color: #a4b3c2;
    font-size: 0.75rem;
    list-style-type: none;
    padding: 0;
}

.footer-disclaimer li {
    display: inline;
    padding: 0 5px;
    border-right: 1px solid #a4b3c2;
}

.footer-disclaimer li:first-of-type {
    padding-left: 0;
}

.footer-disclaimer li:last-of-type {
    padding-right: 0;
    border: none;
}

.footer-disclaimer a {
    color: #a4b3c2;
}

.footer-disclaimer a:hover {
    text-decoration: underline;
}