/*
Theme Name: CERN
Author: CERN Web Team
Author URI: https://home.cern
Description: The officially-distributed theme for WordPress sites at CERN.
Version: 2.0.0-beta47
*/

@font-face {
    font-family: sourcesans-regular;
    src: url('public/fonts/source_sans/regular.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-semibold;
    src: url('public/fonts/source_sans/semibold.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-bold;
    src: url('public/fonts/source_sans/bold.woff2') format('woff2');
}

@font-face {
    font-family: sourcesans-light;
    src: url('public/fonts/source_sans/light.woff2') format('woff2');
}

@font-face {
    font-family: opensans-regular;
    src: url('public/fonts/open_sans/regular.woff2') format('woff2');
}

@font-face {
    font-family: opensans-semibold;
    src: url('public/fonts/open_sans/semibold.woff2') format('woff2');
}

@font-face {
    font-family: opensans-bold;
    src: url('public/fonts/open_sans/bold.woff2') format('woff2');
}

:root {
    --content-width: 1200px;
    --transition-duration: 150ms;
}

:root :where(.is-layout-constrained) > :first-child:not(:only-child) {
    margin-block-start: var(--wp--preset--spacing--30);
}

:root :where(.is-layout-constrained) > :last-child:not(:only-child) {
    margin-block-end: var(--wp--preset--spacing--30);
}

.wp-block-group > .wp-block-group > .entry-content > .alignfull {
    margin-right: calc(var(--wp--preset--spacing--20) * -1);
    margin-left: calc(var(--wp--preset--spacing--20) * -1);
}

.wp-block {
    box-sizing: border-box;
}

/* Only way to set the border radius for video block */
video {
    border-radius: var(--border-radius-large);
}

.alignfull {
    border-radius: 0 !important;
}

/* stylelint-disable-next-line selector-class-pattern */
.wp-block-buttons.alignfull .wp-block-button__width-100 div {
    border-radius: 0 !important;
}

/* Remove the no-block title on post */
.editor-post-title {
    display: none;
}

/* Display youtube embed on frontend as on editor */
/* stylelint-disable-next-line selector-class-pattern */
.wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    height: 0;
    overflow: hidden;

    iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}
