/* 
    Document   : calendar.css

    Created on : 10-Dec-2013, 11:15:30

    Author     : Andy Griffith

    Description:
    Style definitions for calendar elements used on appointment slot
    selection pages.
        
*/

/*  calendarOuterContainer holds not only the calendar but also the 
    "reason" field and the help text.  */

    #calendarOuterContainer
    {
        position: relative;
        padding: 20px 20px 20px 20px;
        overflow: hidden;
    }
    #calendarOuterContainer #helpText
    {
        position: absolute;
        left: 10px;
        top: 25px;
        width: 200px;
    }
    
    #reasonForRebookingContainer
    {
    
        padding: 6px 12px;
        border-radius: 8px;
        margin-top: 10px;
        background-color: white;
    }
    
    div#appointmentCalendarContainer
    {
    
        background-color: #f8f9fa;
        border-radius: 10px;
        padding: 12px;
        width: 760px;
        min-height: 275px;
        height: 450px;
        overflow-y:scroll;
    }
    
    div.calendarContainer.unpopulated
    {
        padding-left: 30px;
        display:none;
    }
    div.calendarInnerContainer
    {
        overflow: visible;
        position: relative;
        height: 100%;
        margin: 0 0 0 0;
        float: left;
        width: 100%;
    }
    div.loading
    {
        position: absolute;
        left: 0px;
        top: 35px;
        right: 0px;
        bottom: 20px;
        min-height: 50px;
        /*background-color: #e3e3e3;*/
        background-image: url( "../images/loading.gif" );
        background-position: center center;
        background-repeat: no-repeat;
    
    }
    div.calendarSlotContainer
    {
        position: relative;
        min-height: 30px;
        display: flex;
        flex-wrap: wrap;
    }
    div.calendarPeriod
    {
        cursor: pointer;
        /*box-sizing: content-box;*/
    }
    
    /*  Heading and navigation elements  */
    div.calendarInnerContainer > div.calendarHeader
    {
        margin: 2px 0 14px;
        padding: 0px;
        display: flex;
    }
    div.calendarInnerContainer > div.calendarHeader > div.calendarHeaderText
    {
        background-color: transparent;
        height: 28px;
        padding-top: 4px;
        font-size: 1.0em;
        font-weight: bold;
        display: inline-block;
        /*width: 100%;*/
        flex-grow: 1;
        text-align: center;
        vertical-align: middle;
    }
    
    div#appointmentCalendarContainer.monthCalendarContainer { height: auto; overflow:auto; }
    
    div.calendarInnerContainer > div.calendarHeader > div.calendarNavigation
    {
        min-width: 30px;
        height: 30px;
        padding: 5px;
        cursor: pointer;
        text-align: center;
        background-color: #e9e8e8;
        vertical-align: middle;
    
        display: inline-flex;
        margin-left: 8px;
        border-radius: 4px;
        /*position: absolute;
        top: 0;*/
    }
    div.calendarInnerContainer > div.calendarHeader > div.calendarNavigation img { }
    div.calendarNext { right: 2px; }
    div.calendarBack { left: 2px; }
    
    
    /*  Year  */
    div.calendarInnerContainer.year
    {
        width: 180px;
        min-width: 180px;
        display: table-cell;
        float: left;
    }
    div.calendarSlotContainer.year > div.calendarPeriod
    {
        background-color: #08b;
        margin: 5px;
        padding: 5px;
        color: white;
    }
    
    /*  Month  */
    div.calendarInnerContainer.month
    {
        width: 100%;
        min-width: 308px;
        max-width: 500px;
        display:block;
        float: none;
        height: auto;
        margin: 0 auto 30px;
    }
    
    div.calendarSlotContainer.month > div.calendarDayHeading
    {
       /* width: 30px;*/
        width: calc(14% - 4px);
        /*height: 20px;*/
        /*background-color: #08c;
        color: white;*/
        font-weight: bold;
        margin: 0 2px;
        padding: 5px;
        font-size: 13px;
        /*float: left;*/
        text-align: center;
        /*box-sizing: content-box;*/
        text-transform: uppercase;
    }
    div.calendarSlotContainer.month > div.calendarPeriod
    {
        /*width: 30px;*/
        width: calc(14% - 4px);
        /*height: 20px;*/
        /*background-color: #eee;*/
        margin: 2px;
        padding: 5px;
        /*float: left;*/
        text-align: center;
    }
    
    /*  Week  */
    div.calendarInnerContainer.week
    {
        width: 308px;
        min-width: 308px;
        display: table-cell;
        float: left;
    }
    div.calendarSlotContainer.week > div.calendarPeriod
    {
        background-color: #08b;
        margin: 5px;
        padding: 5px;
        color: white;
    }
    
    /*  Day  */
    div.calendarInnerContainer.day
    {
    
        height: auto;
        display: block;
        position: relative;
        overflow: visible;
    }
    div.calendarSlotContainer.day > div.calendarPeriod
    {
        background-color: #08b;
        margin: 0px 4px 4px 0px;
        padding: 5px;
        color: white;
        width: 58px;
        float: left;
        text-align: center;
    }
    
    /*  Available/unavailable  */
    div.calendarPeriod.available
    {
        background-color: #8c3 !important;
        font-weight: bold;
        color: white;
        border-radius: 20px;
    }
    div.calendarPeriod.unavailable
    {
        background-color: #ddd !important;
    }
    div.calendarPeriod.outOfBounds
    {
        /*background-color: #ccc !important;*/
        color: #999;
    }
    
    
    /*  Highlighted  */
    div.calendarPeriod.available.highlighted
    {
    
        background-color: #591 !important;
        padding: 5px !important;
    }
    div.calendarPeriod.unavailable.highlighted
    {
    
        padding: 5px !important;
        border: 1px solid #555;
    }
    
    
    /*  Close icon (hidden on non-mobile screens)  */
    div.calendarInnerContainer > div.iconClose
    {
        background-color: #eee;
        border: 1px solid #ccc;
        padding: 5px;
        color: #555;
    
        display: none;
    }
    
    @media (max-width: 992px) {
        div.calendarSlotContainer.day > div.calendarPeriod { width: 24%; margin-right: 1%; box-sizing: border-box; }
    }