/*! HTML5 Boilerplate v7.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 1.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

 
/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

   html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}




 /* ==========================================================================
   Author's custom styles
   ========================================================================== */

body {
    margin: auto;
    /*font-family: Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";*/
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    -webkit-text-size-adjust: 100%;
}

.pages {
    position: relative;
    margin: auto;
    overflow-x: scroll;
    overflow-y: hidden;
    display: flex;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    -webkit-scroll-snap-type: mandatory;
    -ms-scroll-snap-type: mandatory;
}

.page {
    display: inline-block;
    height: 100%;
    scroll-snap-align: start;
    -webkit-snap-align: start;
    -ms-snap-align: start;
}

.page-1 .bubbles {
    font-size: 5pt;
}

.page-2 .bubbles {
    font-size: 6pt;
}

.page-3 .bubbles {
    font-size: 8pt;
}

.page-4 .bubbles {
    font-size: 10pt;
}

.page-5 .bubbles {
    font-size: 12pt;
}

.page-6 .bubbles {
    font-size: 14pt;
}

.page-7 .bubbles {
    font-size: 18pt;
}

.page-8 .bubbles-tall {
    font-size: 24pt;
}

.bubbles, .bubbles-tall {
    position: absolute;
    top: 62px;
    overflow-y: auto;
    height: calc(100% - 240px);
    width: 100%;
}

.bubbles-tall {
    height: calc(100% - 154px);
}

.bubble-container {
    display: flex;
    padding: 10px;
}

.left-bubble-container {
    justify-content: flex-start;
}

.right-bubble-container {
    justify-content: flex-end;
}

.bubble {
    position: relative;
    border-radius: 15px;
    padding: 10px;
    max-width: 300px;
}

.left-bubble {
    background-color: #DADBE1;
    color: #444;
}

.right-bubble {
    background-color: #5F90CB;
    color: #eee;
}

.logo {
    margin-top: 15px;
    margin-bottom: 10px;
    width: 100%;
    height: 30px;
    text-align: center;
}

.logo-img {
    width: 170px;
}

.footer-text {
    font-size: 12pt;
    color: #6E7373;
    text-align: center;
    position: absolute;
    bottom: 110px;
}

.swipe-section {
    height: 90px;
    background-color: #F7F7F6;
    position: absolute;
    bottom: 0;
    text-align: center;
    border-top: 2px solid #DDDEDD;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swipe-logo {
    background-repeat: no-repeat;
    background-size: 62px 62px;
    width: 62px;
    height: 62px;
}

@media (min-device-width:320px) and (max-device-width:1024px) {
    html {
        width: 100%;
        height: 100%;
    }

    body {
        width: 100%;
        height: 100%;
    }

    .pages {
        width: 100%;
        height: 100%;
        border: none;
    }

    .page {
        min-width: 100%;
        min-height: 100%;
    }

    .swipe-section {
        width: 100%;
    }

    .swipe-logo {
        background-image: url("../img/hand-slider.svg");
        background-size: 150px 62px;
        width: 150px;
    }

    .footer-text {
        width: 100%;
    }

    .footer-text::after {
        content: "Swipe to increase/decrease the font size until it's comfortable to read"
    }
}

/* Desktop */
@media (min-device-width:1025px) {
    .pages {
        width: 364.33px;
        height: 721.67px;
    }

    .phone {
        position: absolute;
        left: calc(50% - 182.165px);
        top: 10px;
        min-width: 364.33px;
        min-height: 721.67px;
        background-image: url("../img/plain-phone.png");
        background-size: 364.33px 721.67px;
        background-repeat: no-repeat;
        pointer-events: none;
    }

    .page {
        position: relative;
        margin-left: 0px;
        padding-left: 24px;
        padding-right: 24px;
        margin-top: 100px;
        width: 316px;
        min-width: 316px;
        height: 548px;
        min-height: 548px;
    }

    .bubbles, .bubbles-tall {
        max-width: calc(100% - 45px);
    }

    .swipe-section {
        width: calc(100% - 46px);
    }

    .swipe-logo {
        background-image: url("../img/click.png");
    }

    .swipe-left {
        background-image: url("../img/swipe-left.png");
        background-size: 62px 62px;
        width: 62px;
        height: 62px;
    }

    .swipe-left:hover {
        background-image: url("../img/swipe-left-hover.png");
        cursor: pointer;
    }

    .swipe-right {
        background-image: url("../img/swipe-right.png");
        background-size: 62px 62px;
        width: 62px;
        height: 62px;
    }

    .swipe-right:hover {
        background-image: url("../img/swipe-right-hover.png");
        cursor: pointer;
    }

    .footer-text {
        width: calc(100% - 58px);
        padding-left: 6px;
        padding-right: 6px;
    }

    .footer-text::after {
        content: "Click to increase/decrease the font size until it's comfortable to read"
    }

}

 /* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

 .hidden {
  display: none;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.visuallyhidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap; /* 1 */
}

/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
  white-space: inherit;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " "; /* 1 */
  display: table; /* 2 */
}

.clearfix:after {
  clear: both;
}

 
/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

   @media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

 
/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

   @media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster */
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
