/*Newsletter Custom Post Type Style*/
.single-newsletter .single-newsletter-flex-group {    
    display: grid;    
    grid-template-columns: 1fr 2fr 1fr;   
    grid-template-rows: auto;
    grid-template-areas: 
    "left-sidebar content right-sidebar";  
}

.newsletter-content {
    grid-area: content;
    background-color: var(--wp--preset--color--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;    
    min-width: 95%;
}

.newsletter-content > .wp-block-group {
    max-width: 600px;
}

.newsletter-right-sidebar {
    grid-area: right-sidebar;
    max-height: 450px !important;    
    min-width: 100%;
}

.newsletter-left-sidebar { 
    margin-block-start: 24px !important;
    grid-area: left-sidebar;
    min-width: 100%;
}

.single-newsletter .newsletter-left-sidebar .wp-block-post-title {
    margin-bottom: 0em;
}

.newsletter-left-sidebar .wp-block-group,
.newsletter-right-sidebar .wp-block-group {	
    background-color: var(--wp--preset--color--light-grey);
	padding: var(--wp--preset--spacing--50);
}

/*Newsletter Archives Block Styles*/
.newsletter-left-sidebar .wp-block-group h3 + div {
    display: block;
}

.mps-newsletter-archives .newsletter-year-header {
    font-family: var(--wp--preset--font-family--oswald);
    font-size:  var(--wp--preset--font-size--medium);
    color: var(--wp--preset--color--dark-grey);
    display: flex;   
    align-items: baseline;
    gap: 8px;
}

.mps-newsletter-archives .newsletter-year-header i {
    font-size: 18px;
}

.mps-newsletter-archives .newsletter-year-header:hover {
    color: var(--wp--preset--color--medium-grey);
}

.mps-newsletter-archives .newsletter-year-list {
    display:none;
}

.mps-newsletter-archives .newsletter-item {
    display: flex;   
    justify-content: flex-start;
    align-items: space-around;
    flex-wrap: nowrap;
    gap: 24px;
    margin-top: 1em;
    margin-bottom: 1em;
}

.mps-newsletter-archives .newsletter-date {
    font-family: var(--wp--preset--font-family--roboto);
    font-size:  var(--wp--preset--font-size--small);
    font-weight: 500;
    text-transform: uppercase;
    flex-basis: 20%;
    flex-grow: 0;
    align-self: stretch;
    /* width: 20%; */
    /* min-width: 15%; */
}

.mps-newsletter-archives .newsletter-title {
    display: flex;
    align-items: center;
    font-family: var(--wp--preset--font-family--raleway);
    font-size:  var(--wp--preset--font-size--small);    
    flex-basis: 80%;
    flex-grow: 0;
    align-self: stretch;
    /* width: 80%; */
    line-height: 1.1;
    /* min-width: 80%; */
}

.mps-newsletter-archives a:hover {
	color:var(--wp--preset--color--medium-orange-half);  
}

/*Newsletter Content Pattern*/
.single-newsletter .wp-block-post-title {	
    font-family: var(--wp--preset--font-family--raleway); 
	font-size: var(--wp--preset--font-size--medium-x-large);	
	margin-bottom: .5em;
}

.single-newsletter figure {
	width:100% !important;
}

.single-newsletter figure img {	
	width: 100%;
	height: auto;
	box-sizing: border-box;	
}

.single-newsletter p + h3,
.single-newsletter div + h3 {
    font-family: var(--wp--preset--font-family--roboto) !important; 
	font-size: var(--wp--preset--font-size--x-small);	
	margin-bottom: .25em;
}

.mps-featured-product {
    margin-top: .25em !important;
}

@media (max-width: 799px) {
    .single-newsletter .single-newsletter-flex-group {    
        display: grid;        
        grid-template-columns: 100%;   
        grid-template-rows: auto;
        grid-template-areas:        
        "content"
        "right-sidebar"
        "left-sidebar";  
    }
    
    .newsletter-content {
        grid-area: content;
        margin-top: 0 !important;       
    }

    .newsletter-right-sidebar {
        grid-area: right-sidebar;        
        min-width: 95%;
    }

    .newsletter-left-sidebar { 
        grid-area: left-sidebar;       
        min-width: 95%;       
    }
}

@media (max-width: 480px) {
    .newsletter-cta .wp-block-buttons {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }
}

@media (min-width: 480px) and (max-width:799px) {
	.newsletter-cta .wp-block-buttons {        
        justify-content: space-around;
        align-items: center;
    }

    /* Newsletter Archives List */
    .newsletter-left-sidebar,
    .newsletter-right-sidebar {
        margin-left: 5vw !important;
        margin-right: 5vw !important;
    }

    .newsletter-left-sidebar .wp-block-column:first-child.is-vertically-aligned-bottom,
    .wp-block-column:first-child.is-vertically-aligned-center,
    .wp-block-column:first-child.is-vertically-aligned-top {
        max-width: 15% !important;
    }

    .newsletter-left-sidebar .wp-block-column:last-child.is-vertically-aligned-bottom,
    .wp-block-column:last-child.is-vertically-aligned-center,
    .wp-block-column:last-child.is-vertically-aligned-top {
        max-width: 80% !important;
    } 

    /* need these in addition to above to control width */
    .newsletter-left-sidebar .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:first-child {
        flex-basis: 15% !important;
        max-width: 15% !important; 
        align-self: center;
    }

    .newsletter-left-sidebar .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:last-child {
        flex-basis: 80% !important;
        max-width: 80% !important;
        align-self: center;
    }

    .single-newsletter .newsletter-left-sidebar .wp-block-post-title {
        margin-bottom: 0em;
    }
}

@media (min-width: 800px) and (max-width: 1000px) {
    .single-newsletter :where(.wp-block-group.has-background) {
        padding-top: 0em !important;
    }

    .single-newsletter .single-newsletter-flex-group {    
        display: grid;        
        grid-template-columns: 50% 50%;   
        grid-template-rows: auto;
        grid-template-areas:        
        "content content"
        "right-sidebar left-sidebar";  
    }
    
    .newsletter-content {
        grid-area: content;       
        min-width: 95%;
        padding-top: 15px !important;      
    }
    
   .newsletter-right-sidebar {
        grid-area: right-sidebar;       
        min-width: 95%;       
    }

    .newsletter-left-sidebar { 
        grid-area: left-sidebar;       
        min-width: 95%;       
    }

    .newsletter-cta .wp-block-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

@media (min-width: 1001px) and (max-width: 1441px) {
    .single-newsletter .single-newsletter-flex-group {
        margin-left: 0px !important;
        margin-right: 0px !important;
        max-width: 100vw !important;
        display: grid;
        grid-template-columns: 1fr 70%;
        grid-template-rows: 450px auto;
        grid-template-areas: 
        "sidebar-top content"                      
        "sidebar-bottom content";
        row-gap: 24px;
    }
 
    .newsletter-content {
        grid-area: content;
        flex-basis: 100%;        
        max-width: 100vw !important;
        min-width: 100%;
    }

    .newsletter-right-sidebar {
        grid-area: sidebar-top;
        max-height: 450px !important;
        min-width: 28vw !important;
    }

    .newsletter-left-sidebar {         
        grid-area: sidebar-bottom;       
        min-width: 28vw !important;
    }

    .newsletter-cta .wp-block-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}