/*  IN-HOUSE CSS CHANGES - Created 29/08/18  */

/******************************* SECTION SPECIFIC ********************************/

/* ----- Homepage ----- */

/* Hide video banner & replace with static */
.c-banner {
    display: none !important;
}

.home__banner {
    margin-bottom: 1rem;
}

/* New home section */
.home .o-flexible-module grid-container:first-child {
    margin-bottom: 2rem;
}

@media print, screen and (min-width: 40em) {
    .home .grid-margin-x > .medium-offset-2 {
        width: calc(100% - 1.875rem);
    }

    .home .grid-margin-x > .cell {
        margin-left: 0.9375rem;
        margin-right: 0.9375rem;
    }
}

@media print, screen and (max-width: 40em) {
    .home-boxes {
        width: calc(100% - 1.25rem) !important;
        margin-bottom: 1rem !important;
    }
}

.home-boxes {
    border: 7px solid #f2f2f2;
    background: #f2f2f2;
}

.home-boxes p {
    margin-bottom: 0;
}

.home-boxes .c-button {
    text-align: center;
    padding: 0.5rem 2.75rem 0.5rem 0.4rem;
    width: 100%;
}

@media print, screen and (min-width: 40em) {
    .o-flexible-module:nth-child(1),
    .o-flexible-module:nth-child(2) {
        margin-bottom: 2rem;
    }
}

@media screen and (max-width: 39.9375em) {
    .o-icon-strip__icons .cell:not(:last-child) {
        margin-bottom: 0;
    }
}

.home .c-table,
.page-pat-training-course .c-table {
    font-size: 0.95rem;
}

/* Calendar on mobile */
@media print, screen and (max-width: 23em) {
    .home .c-table {
        font-size: 0.8rem;
    }
}

/* ----- Info & Booking Page ----- */

/* New bottom section */
.c-product__course-booker .c-product__price,
.c-product__course-booker .c-product__price-suffix {
    color: #202529;
}

.c-product__course-booker .c-button--alpha {
    font-size: 1.5rem;
    margin: 0 auto 2rem auto !important;
    display: block;
}

.c-product--booking .c-product__content-container .grid-container:nth-child(4) .large-4 {
    border-top: 2rem solid #fff;
}

@media print, screen and (min-width: 64em) {
    .o-content-box {
        padding: 3rem 1rem;
    }

    .c-product--booking .c-product__content-container .grid-container:nth-child(4) .large-4 {
        border-top: 0 !important;
    }

    .c-product__course-booker .c-product__price-meta {
        margin-top: 3.8rem;
    }

    .c-product__course-booker .c-button--alpha {
        display: inline-block;
        margin-top: 2rem;
    }

    /*.c-product__course-booker a.c-button {
    margin-top: 6.8rem;
}*/
}

@media print, screen and (max-width: 40em) {
    .c-modal--course .c-page-title__intro span {
        display: block;
    }

    .s-woocommerce-booking .wc-bookings-booking-form .form-field {
        text-align: center !important;
        width: auto !important;
    }

    .wc-bookings-booking-form label[for='wc_bookings_field_persons'],
    .wc-bookings-booking-form label[for='wc_bookings_field_resource'],
    .wc-bookings-booking-form label[for='js-booking-dates'] {
        width: auto !important;
        display: block;
        text-align: center;
    }

    .product-addon-basic-bundle,
    .product-addon-intermediate-bundle,
    .product-addon-advanced-bundle,
    .product-addon-industrial-bundle {
        width: calc(100% - 1.25rem) !important;
    }
}

/* Calendar on mobile */
@media print, screen and (max-width: 23em) {
    .page-pat-training-course .large-8 .o-content-box {
        padding: 1rem;
    }

    .page-pat-training-course .c-table {
        font-size: 0.8rem;
    }
}

/* ----- Booking Modal ----- */

/* Match top & bottom position */
@media print, screen and (min-width: 40em) {
    .reveal,
    .reveal.large {
        margin-bottom: 100px !important;
    }
}

/* Adding Title To Bundles (plus mobile fix) */
.s-wooocommerce-booking .wc-pao-addons-container .c-addon:first-child::after {
    content: 'Optional Extra: Upgrade To Training & PAT Tester Bundles';
    color: #4d94cb;
    font-size: 1.6rem;
    font-weight: 700;
    border-top: 1px solid #202529;
    padding-top: 20px;
    margin-top: 20px;
}

@media only screen and (max-device-width: 639px) {
    .s-woocommerce-booking .wc-pao-addons-container .c-addon:first-child::after {
        border-top: none !important;
    }

    .s-woocommerce-booking .wc-pao-addons-container .c-addon:first-child {
        border-bottom: none !important;
    }
}

/* Top section style changes */
.s-woocommerce-booking .wc-bookings-booking-form .form-field {
    width: 390px;
    margin: 0 auto 1em auto;
    text-align: left;
}

.wc-bookings-booking-form label[for='wc_bookings_field_persons'],
.wc-bookings-booking-form label[for='wc_bookings_field_resource'],
.wc-bookings-booking-form label[for='js-booking-dates'] {
    width: 100px;
    margin: 0 0.5rem 0 0;
}

/* Book section style changes */
.wc-pao-addons-container .c-addon:first-child .c-addon__media {
    display: none !important;
}

@media print, screen and (min-width: 64em) {
    .wc-pao-addons-container .c-addon:first-child .c-addon__desc-container {
        max-width: 80%;
    }
}

.wc-pao-addons-container .c-addon:first-child {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.wc-pao-addons-container .c-addon:first-child .c-addon__desc-container .c-addon__name {
    font-size: 1.6rem;
    color: #4d94cb;
}

/* Bundle fixes */
.c-addon__desc ul {
    text-align: left;
}

.c-addon__desc li {
    font-size: 0.875rem !important;
    margin-bottom: 0.5rem !important;
}

.c-addon__desc a {
    color: #1779ba;
    text-decoration: underline;
}

/* Firefox fixes */
.c-quantity-selector__actions {
    height: auto;
}

#wc_bookings_field_persons {
    max-width: 80px;
}

/* Hide add-on price labels & create new ones */
.wc-pao-addons-container .product-addon .c-quantity__element label {
    display: none;
}

.optional-extra-price {
    font-weight: bold;
    font-size: 1rem;
}

/* ----- Course Calendar Page ----- */

.course-calendar__table {
    margin-top: 2rem !important;
}

/* Reduced font-size on mobile */
@media print, screen and (max-width: 23em) {
    .course-calendar .c-table {
        font-size: 0.9rem;
    }
}

/* ----- On-Site Page ----- */

/* Reduce section spacing */
.on-site-training__modules,
.c-content-pod:not(:last-child) {
    margin: 2rem 0;
}

/* Responsive fix for hardcoded PDF button */
@media print, screen and (max-width: 40em) {
    .on-site-training .c-page-banner__ctas .c-button:not(:last-child) {
        margin-bottom: 1rem;
    }
}

@media print, screen and (min-width: 40em) {
    .on-site-training .c-page-banner__ctas .c-button:not(:last-child) {
        margin-right: 1.8rem;
    }
}

/* Updated bottom section */
.on-site-training .o-price-strip .c-centered-text {
    display: none;
}

.on-site-training .o-price-strip .c-button--alpha {
    font-size: 1.5rem;
}

/* ----- Bundles Page ----- */

.bundles__bundle-container {
    margin-top: 1rem;
}

/* Minor layout update */
@media print, screen and (min-width: 40em) {
    .c-bundle .grid-margin-x > .medium-6 {
        width: calc(100% - 1.875rem) !important;
    }
}

/* Breakdown styles */
.c-bundle .c-table tbody tr td {
    color: #0f547c !important;
    text-align: left !important;
}

.c-bundle .c-table tbody tr:nth-last-child(2) td:not(:first-child) {
    text-decoration: line-through;
}

.bundle-vat {
    color: #202529;
    font-size: 1rem;
}

/* ----- Location Category Page ----- */

/* Add image borders */
.c-location--listed img {
    border: 1px solid #202529;
}

/* ----- Single Location Page ----- */

/* Reduced H1 size on desktop */
@media screen and (min-width: 75rem) {
    .c-location h1 {
        font-size: 2.5rem;
    }
}

/* Full width directions on mobile */
@media print, screen and (max-width: 40em) {
    .l-location-directions > .cell {
        width: calc(100% - 1.25rem) !important;
    }
}

/* ----- Hire Page ----- */

/* Design tweaks */
.c-hire-product .c-offset-content-pod__section {
    font-size: 0.9rem;
}

@media print, screen and (min-width: 40em) {
    .c-hire-product .c-offset-content-pod__content .c-offset-content-pod__section:nth-child(2) {
        float: right;
        width: 50%;
        border-left: 1px solid #202529;
        padding-left: 25px;
        margin-left: 25px;
    }

    .hire-shipping {
        text-align: right;
    }
}

.hire-shipping {
    width: 100%;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #4d94cb;
}

@media print, screen and (min-width: 40em) {
    .equipment-hire__ctas {
        margin: 1rem auto 2rem auto;
    }
}

/* ----- Calibration Page ----- */
@media print, screen and (min-width: 40em) {
    .calibration__content-container .o-icon-strip {
        margin-top: 2rem;
    }

    .calibration .o-price-strip {
        margin-top: 4rem;
    }
}

/* ----- About Us Page ----- */

/* Change body link styles */
.about-us .o-flexible-module .s-cms-content a {
    color: #1779ba !important;
}

/* ----- Category Pages ----- */

/* PAT Category - 'free gift' style */

.term-pat-testers .c-page-banner__content:after {
    content: '** Free Gift & Label Bundle With All PAT Testers **';
    display: block;
    margin: 1rem 0;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    background: #1779ba;
    padding: 1rem;
}

@media print, screen and (min-width: 40em) {
    .term-pat-testers .c-page-banner__content:after {
        width: max-content;
    }
}

@media print, screen and (max-width: 40em) {
    .grid-margin-x.small-up-1 > .cell {
        width: calc(50% - 1.25rem);
    }

    .shop__categories .c-button {
        padding: 0.5rem 3rem 0.5rem 0.5rem;
        font-size: 0.775rem;
    }
}

/* ----- Product Pages ----- */

/* Change top section styles */
.c-product--standard .c-page-banner {
    background-color: #fff;
    border-bottom: 2px solid #ccc;
    padding-bottom: 2rem;
}

/* ----- Cart Page ----- */

/* Fix item styles */
.woocommerce td.product-name dl.variation dt {
    margin-bottom: 0;
}

/* Mobile style - quanitiy position */
@media print, screen and (max-width: 768px) {
    .page-cart .c-quantity-selector__input {
        margin-left: 67%;
    }
}

/* Payment option styles */
.wc_payment_methods .input-radio {
    width: auto;
    max-width: 1.2rem;
    display: inline;
}

/******************************* GENERAL / UNIVERSAL CHANGES ********************************/

/* Spacing changes */

.o-flexible-module:not(:last-child) {
    margin-bottom: 2rem;
}

/* Character Styles */
.c-content-pod__title,
.c-product__course-summary .c-content-pod__title {
    font-size: 1.8rem;
}

.c-banner__title,
.c-page-banner__title,
.c-page-title,
.c-price-box__price,
.c-product--booking .c-product__title,
.utl-heading-alpha,
h1 {
    font-size: 2rem;
    font-size: calc(2rem + 0.5 * ((100vw - 20rem) / 55));
}

@media screen and (min-width: 75rem) {
    .c-banner__title,
    .c-page-banner__title,
    .c-page-title,
    .c-price-box__price,
    .c-product--booking .c-product__title,
    .utl-heading-alpha,
    h1 {
        font-size: 2.5rem;
    }
}

.c-table tr.is-unavailable td,
.c-table tr.is-unavailable td a {
    color: #b3b3b3 !important;
}

/* Page banner (top section) link styles */
.c-page-banner__content a,
.c-page-banner__intro a {
    text-decoration: underline;
    color: #1779ba;
}

.c-product__onsite-courses {
    text-decoration: none !important;
}

/* Why Us Icons */
.c-icon-hero__text {
    min-height: 48px;
}

/* Testimonials */
.c-testimonial__quote {
    font-style: italic;
}

/*  Alerts  */
.woocommerce-message {
    border-top-color: #8fae1b !important;
}

.woocommerce-message::before {
    color: #8fae1b !important;
}
