/**
 * Theme Name:        Shroton PC Theme
 * Description:       Shroton Parish Council Theme (Child of 2025)
 * Version:           1.0.1
 * Author:            Egret Digital
 * Author URI:        https://egret.digital/
 * Text Domain:       shroton-theme
 * Domain Path:       /assets/lang
 * Tested up to:      6.8
 * License:           GNU General Public License v2.0 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Template:          twentytwentyfive
 */

/* Unset underline on links */
header a,
footer a {
	text-decoration: none;
}

/* Highlight current menu item */
nav {
	/*.wp-block-navigation-item__content {*/
	/*	color: var(--wp--preset--color--vivid-cyan-blue) !important;*/
	/*}*/
	.current-menu-item > a,
	a:hover,
	a:active {
		color: var(--wp--preset--color--custom-shroton-bright-green) !important;
	}
}
/* Hide home link on desktop */
/*@media (min-width: 600px) {*/
/*    .home-link {*/
/*        display: none !important;   */
/*    }*/
/*}*/


/* Archive pages - core fix for loop images sometimes being wider than containers */
.archive .wp-block-post-featured-image {
	max-width: 100% !important;
	img {
		border-radius: 0 40px;
	}
}
/* Core fix for list items displayed as flex */
.archive .entry-content li {
	display: list-item;
}


/* Gravityforms styles */
#gform_1 {
	label,
	legend {
    	--gf-local-font-size: var(--wp--preset--font-size--medium);
    }
    
    .gform_button {
    	--gf-local-font-size: var(--wp--preset--font-size--medium);
    	--gf-local-padding-y: 0.2rem;
    	padding-top: 0.4rem; /* Override due to weird unbalanced font */
    	--gf-ctrl-btn-bg-color-primary: var(--wp--preset--color--custom-shroton-bright-green);
    	--gf-ctrl-btn-border-color-primary: var(--wp--preset--color--custom-shroton-bright-green);
    	--gf-ctrl-btn-border-color-hover-primary: var(--wp--preset--color--custom-shroton-dark-green);
    	--gf-ctrl-btn-bg-color-hover-primary: var(--wp--preset--color--custom-shroton-dark-green);
    	--gf-ctrl-btn-border-width-primary: 2px;
    	--gf-ctrl-btn-font-weight: bold;
    	margin: auto;
    }
}


/* Set min height on banner images */
.banner-img img {
    min-height: 200px;
    object-fit: cover;
}


/* Stretch media-text blocks to full height within column blocks */
.wp-block-column {
    .wp-block-media-text,
    figure.full-height {
        height: 100%;
    }
    > figure.full-height > img {
        height: 100%;
        object-fit: cover;
    }
}

/* Make columns wrap at wider breakpoint if they contain media-text blocks */
.wp-block-columns:has(.wp-block-media-text) {
    @media (max-width: 1024px) {
        flex-wrap: wrap !important;
    
        > .wp-block-column {
            flex-basis: unset;
        }
    }
}

/* Show prices table full width on mobile */
.full-width-table {
    @media (min-width: 602px) {
        width: calc(100% + 40px);
        margin-left: -20px !important;
    }
    @media (max-width: 601px) {        
        margin-left: calc(50% - 50vw + 10px) !important;
        margin-right: calc(50% - 50vw + 10px) !important;
        max-width: 100vw;
    }
}
