/* =========================================================Bootstrap 3Dynamic Image Width + Dynamic Screen Height========================================================= */
/* ---------------------------------------------------------MODAL OUTER--------------------------------------------------------- */
#notification {
    padding: 0 !important;
    overflow: hidden !important;
}
/* ---------------------------------------------------------MODAL DIALOG--------------------------------------------------------- */
#notification .neogscon-modal-dialog {
    /** Width is NOT fixed.* The image determines the modal width.*/
    width: auto !important;
    max-width: calc(100vw - 20px);
    /** Bootstrap normally adds 30px top/bottom.* We reduce it so the complete modal can fit.*/
    margin: 10px auto !important;
    /** Makes the dialog shrink to the content width.*/
    display: table;
    max-height: calc(100vh - 20px);
}
/* ---------------------------------------------------------MODAL CONTENT--------------------------------------------------------- */
#notification .neogscon-modal-content {
    width: auto !important;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    background: #ffffff;
    border: none !important;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 5px 25px rgba(0,0,0,0.40);
}
/* ---------------------------------------------------------HEADER--------------------------------------------------------- */
#notification .neogscon-modal-header {
    position: relative;
    box-sizing: border-box;
    height: 96px;
    min-height: 96px;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    background-color: #7c0000;
    color: #ffffff;
    text-align: center;
    font-family: Kanit-Light, Arial, sans-serif;
    border-bottom: none !important;
}
/* Header title */
#notification .neogscon-modal-header h4 {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 18px;
    line-height: 20px;
}
/* Header secondary text */
#notification .neogscon-modal-header h5 {
    margin-top: 2px;
    margin-bottom: 2px;
    font-size: 13px;
    line-height: 15px;
}
/* Countdown */
#notification .neogscon-countdown {
    margin-top: 3px !important;
}
/* ---------------------------------------------------------CLOSE BUTTON--------------------------------------------------------- */
#notification .neogscon-close {
    position: absolute;
    z-index: 1000;
    right: 5px;
    top: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #d00000;
    opacity: 1;
    font-size: 38px;
    font-weight: normal;
    line-height: 36px;
    text-align: center;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.35);
}
/* Close hover */
#notification .neogscon-close:hover,
#notification .neogscon-close:focus {
    color: #ff0000;
    opacity: 1;
    outline: none;
}
/* --------------------------------------------------------- MODAL BODY--------------------------------------------------------- */
#notification .neogscon-modal-body {
    box-sizing: border-box;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center;
    overflow: hidden !important;
}
/* ---------------------------------------------------------IMAGE CONTAINER--------------------------------------------------------- */
#notification .neogscon-image-container {
    width: auto;
    padding: 0;
    margin: 0;
    text-align: center;
    line-height: 0;
    overflow: hidden;
}
/* ---------------------------------------------------------FLYER--------------------------------------------------------- */
#notification .neogscon-flyer {
    display: block;
    width: auto;
    height: auto;
    /** Original flyer width = 666px.** Therefore it will never become larger than* its natural size.*/
    max-width: 666px;
    /** JavaScript dynamically changes this value.*/
    max-height: calc(100vh - 260px);
    width: auto;
    margin: 0 auto;
    object-fit: contain;
}
/* ---------------------------------------------------------BUTTON AREA--------------------------------------------------------- */
#notification .neogscon-buttons {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 8px 6px;
    margin: 0;
    background: #ffffff;
    text-align: center;
    line-height: normal;
}
/* ---------------------------------------------------------BUTTONS--------------------------------------------------------- */
#notification .neogscon-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 3px 0;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 13px;
    line-height: 1.35;
}
/* =========================================================TABLET========================================================= */
@media (max-width: 991px) {
    #notification .neogscon-modal-dialog {
        max-width: calc(100vw - 16px);
        margin: 8px auto !important;
    }
    #notification .neogscon-modal-content {
        max-width: calc(100vw - 16px);
    }
    #notification .neogscon-flyer {
        max-width: calc(100vw - 16px);
    }
}
/* =========================================================MOBILE========================================================= */
@media (max-width: 767px) {
    #notification .neogscon-modal-dialog {
        max-width: calc(100vw - 8px);
        margin: 4px auto !important;
    }
    #notification .neogscon-modal-content {
        max-width: calc(100vw - 8px);
        border-radius: 3px;
    }
   /* Smaller header on mobile */
    #notification .neogscon-modal-header {
        height: 86px;
        min-height: 86px;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
    #notification .neogscon-modal-header h4 {
        font-size: 16px;
        line-height: 18px;
        margin-top: 2px;
        margin-bottom: 2px;
    }
    #notification .neogscon-modal-header h5 {
        font-size: 11px;
        line-height: 13px;
        margin-top: 1px;
        margin-bottom: 1px;
    }
    #notification .neogscon-close {
        width: 36px;
        height: 36px;
        right: 3px;
        top: 3px;
        font-size: 32px;
        line-height: 31px;
    }
    #notification .neogscon-flyer {
        max-width: calc(100vw - 8px);
        max-height: calc(100vh - 245px);
    }
    #notification .neogscon-buttons {
        padding: 2px 5px 4px;
    }
    #notification .neogscon-btn {
        margin: 2px 0;
        padding-top: 4px;
        padding-bottom: 4px;
        font-size: 11px;
        line-height: 1.3;
    }
}
/* =========================================================VERY SHORT SCREENS========================================================= */
@media (max-height: 650px) {
    #notification .neogscon-modal-dialog {
        margin-top: 3px !important;
        margin-bottom: 3px !important;
        max-height: calc(100vh - 6px);
    }
    #notification .neogscon-modal-content {
        max-height: calc(100vh - 6px);
    }
    #notification .neogscon-modal-header {
        height: 80px;
        min-height: 80px;
    }
    #notification .neogscon-modal-header h4 {
        font-size: 15px;
        line-height: 17px;
    }
    #notification .neogscon-modal-header h5 {
        font-size: 10px;
        line-height: 11px;
    }
    #notification .neogscon-btn {
        margin: 1px 0;
        padding-top: 2px;
        padding-bottom: 2px;
        font-size: 10px;
    }
}
