/* Modal Windows
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.modal {
	width: 100vw;
	height: 100vh;
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	padding: 2rem;
	overflow: hidden;
    font-size: clamp(0.8em, 2vw, 1em);
}

	.modal > .modal-close {
		display: block;
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 1;
		background-color: rgba(0,0,0,.25);
	}

	.modal-frame {
		width: 500px;
		max-width: 100%;
		max-height: 100%;
		position: relative;
		z-index: 2;
		background-color: #fff;
		box-shadow: 0 8px 32px rgba(0,0,0,.15);
		overflow-y: auto;
	}
	
	/* 2. Target the scrollbar track */
	.modal-frame::-webkit-scrollbar {
		-webkit-appearance: none;
		width: 8px; /* Set the width of the scrollbar */
	}
	
	/* 3. Target the draggable handle (thumb) */
	.modal-frame::-webkit-scrollbar-thumb {
		border-radius: 4px;
		background-color: rgba(0, 0, 0, .5); /* Visible color */
		box-shadow: 0 0 1px rgba(255, 255, 255, .5); /* Adds contrast */
	}
	
	/* 4. Target the background of the scrollbar (track) */
	.modal-frame::-webkit-scrollbar-track {
		background-color: #f1f1f1; 
		border-radius: 4px;
	}

		.modal-frame .modal-close {
			width: 32px;
			height: 32px;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #fff;
			font-size: 1.5rem;
			font-weight: bold;
			text-decoration: none;
		}

    .modal .wrapper {
        width: 45rem;
    }


/* Header */
.modal .header {
    padding: 0.75em 0;
    background: url("../images/modal_header_bg.jpg") center / cover no-repeat #003957;
    font-size: 1.25em;
    text-align: center;
    color: #fff;
}

    .modal .header .flex {
        justify-content: center;
        gap: 0;
    }

        .modal .header .flex > div {
            display: flex;
            align-items: center;
            gap: 0.5em;
            padding: 0 1em;
        }

        .modal .header .flex > div:not(:first-child) {
            border-left: 1px solid currentColor;
        }

    .modal .header img {
        height: 1.2em;
    }

/* Website */
.modal .website {
    padding: 0.75em 0;
    background-image: linear-gradient(90deg, #4790c3, #223d66);
    font-size: 1.25em;
    font-weight: 600;
    text-align: center;
    color: #e2eef6;
}

    .modal .website a {
        color: inherit;
    }

/* Logos */
.modal .logos {
    padding: 1em 0;
    background: url("../images/modal_logos_bg.jpg") top center / 100% auto no-repeat;
}

    .modal .logos .flex {
        align-items: stretch;
        justify-content: center;
        gap: 0;
    }

        .modal .logos .flex > div {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1em;
        }

        .modal .logos .flex > div:not(:first-child) {
            border-left: 1px solid #c0cace;
        }

        .modal .logos .flex img {
            width: auto;
            max-height: 10em;
            margin: 0 auto;
        }

/* Member info */
.modal .member {
    padding: 0.25em 0;
    background-color: #003957;
    font-weight: 500;
    color: #fff;
}

    .modal .member .flex {
        gap: 1em;
    }

    .modal .member .icon {
        width: 4em;
        flex: 0 0 auto;
    }

    .modal .member .company {
        font-size: 1.2em;
    }

/* Main content */
.modal .content {
    padding: 2em 0;
    text-align: center;
}

    .modal .content .heading {
        font-size: 2.5em;
        font-weight: 800;
        text-wrap: balance;
        line-height: 1.1;
    }

    .modal .content .subhead {
        margin-top: 0.5em;
        font-size: 1.25em;
        color: #596673;
    }

    .modal .content hr {
        height: 1px;
        display: block;
        margin: 2em 0;
        background-color: #4fb7e7;
        border: 0;
    }

    .modal .content .promo-code {
        position: relative;
        padding: 2em 2em 0.75em;
        background-color: #edf3f9;
        border: 2px solid #224681;
        border-radius: 1em;
        outline: 2px solid #afbbcd;
        outline-offset: -8px;
        overflow: hidden;
        color: #003957;
    }

        .modal .content .promo-code .top,
        .modal .content .promo-code .bottom {
            border-top: 1px solid #476599;
        }

        .modal .content .promo-code .top {
            font-size: 1.25em;
            font-weight: 700;
        }

        .modal .content .promo-code .bottom {
            margin-top: 1.5em;
            font-size: 1.2em;
            font-weight: 500;
            color: #404146;
        }

        .modal .content .promo-code :where(.top, .bottom) span {
            display: inline-block;
            padding: 0 0.5em;
            background-color: #edf3f9;
            transform: translateY(-50%);
        }

        .modal .content .promo-code .code {
            font-weight: 800;
            color: #003957;
        }

        .modal .content .promo-code .code button {
            width: 100%;
            appearance: none;
            display: block;
            padding: 0;
            background: transparent;
            border: 0;
            cursor: pointer;
            color: currentColor;
        }

        .modal .content .promo-code .code button::before {
            content: "Copied promo code to clipboard!";
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            inset: 0;
            z-index: 1;
            background-color: rgb(34, 70, 129, 90%);
            font-weight: 500;
            color: #fff;
            opacity: 0;
            pointer-events: none;
            user-select: none;
            transition: 0.3s ease opacity;
        }

        .modal .content .promo-code .code button.is-copied::before {
            opacity: 1;
        }

        .modal .content .promo-code text {
            fill: currentColor;
        }

    .modal .content .in-person-notice {
        padding: 1em;
        margin: 2em 0;
        background-color: #edf3f9;
        border: 2px solid #224681;
        border-radius: 1em;
        font-weight: 700;
        text-align: left;
        color: #003957;
    }

        .modal .content .in-person-notice .flex {
            align-items: stretch;
            gap: 1em 0;
        }
        
            .modal .content .in-person-notice .flex > div {
                display: flex;
                align-items: center;
                padding: 0 1.5rem;
            }

        .modal .content .in-person-notice .icon {
            width: 35%;
            min-width: 10em;
            flex: 0 1 auto;
            margin: 0 auto;
        }

        .modal .content .in-person-notice .text {
            border-left: 1px solid #003955;
            font-size: 1.75em;
            line-height: 1.2;
        }

    .modal .content .fine-print {
        margin-top: 1em;
        text-align: left;
    }

        .modal .content .fine-print .flex {
            gap: 1em;
            align-items: start;
        }

        .modal .content .fine-print .icon {
            width: 6em;
            min-width: 4em;
            max-width: 20%;
            flex: 0 0 auto;
        }

        .modal .content .fine-print .details {
            padding-top: 1em;
            flex: 1 1 auto;
        }

        .modal .content .fine-print .title {
            border-top: 1px solid #4fb7e7;
            font-size: 1.2em;
            font-weight: 700;
            color: #003957;
            letter-spacing: 0.05em;
        }

            .modal .content .fine-print .title span {
                display: inline-block;
                padding-right: 0.5em;
                background-color: #fff;
                transform: translateY(-50%);
            }

        .modal .content .fine-print ul {
            padding: 0 0 0 1.2em;
            margin: 0;
            font-family: 'Myriad Pro', sans-serif;
        }

        .modal .content .fine-print li {
            margin-top: 0.25em;
        }

/* Footer */
.modal .footer {
    padding: 1.25em;
    background: url("../images/modal_footer_bg.jpg") center / cover no-repeat #003957;
    color: #fff;
}

    .modal .footer .flex {
        gap: 0;
    }

    .modal .footer .flex > div:not(:first-child) {
        border-left: 1px solid #fff;
    }

    .modal .footer .flex > div {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5em;
        padding: 0 1em;
    }

    .modal .footer img {
        width: auto;
        height: 1.25em;
    }


/* Open Modal
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.modal.js-is-open {
	display: flex;
	align-items: center;
	justify-content: center;
}

	.modal.js-is-open > .modal-close {
		animation: .3s ease modalFade;
	}

	.modal.js-is-open .modal-frame {
		animation: .7s ease modalSlideIn;
	}


/* Animations
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@keyframes modalFade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes modalSlideIn {
	from {
		top: -100px;
		opacity: 0;
	}
	to {
		top: 0;
		opacity: 1;
	}
}


/* Utility
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.modal .color-blue {
    color: #003957 !important;
}

.modal .color-blue-light {
    color: #4fb7e8 !important;
}


/* Media queries
–––––––––––––––––––––––––––––––––––––––––––––––––– */

/* 600px */
@media (max-width: 37.5em) {

    .modal .content .heading {
        font-size: 2em;
    }

}

/* 480px */
@media (max-width: 30em) {

    .modal .header,
    .modal .website {
        font-size: 1em;
    }

    .modal .header img,
    .modal .content .fine-print .icon {
        display: none;
    }

    .modal .content .in-person-notice .flex {
        flex-direction: column;
        text-align: center;
    }

        .modal .content .in-person-notice .text {
            padding: 0 !important;
            border: 0;
            font-size: 1.25em;
        }

    .modal .footer .flex > div {
        flex-direction: column;
        text-align: center;
    }

}