/* =====================================================
   GENERAL LAYOUT
=====================================================*/

*{
    box-sizing:border-box;
}

img{
    max-width:100%;
    height:auto;
}

.pull-right{
    float:right;
}

.section-break{
    margin-top:1em;
    margin-bottom:0.5em;
    padding-top:0.8em !important;
    border-top:1px solid #ccc;
}

/* =====================================================
   OVERLAY & LOADING
=====================================================*/

#overlay{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.7);
    z-index:1000;
}

#loading{
    border:1px solid #2a67ac;
    padding:10px 10px 10px 60px;
    width:100%;
    max-width:1200px;
    min-width:320px;
    height:100px;
    background:#fff url('../images/FhHRx-Spinner.gif') 10px 50% no-repeat;
    position:fixed;
    display:none;
    z-index:3000;
}

#loading h4{
    margin:3px 0 0 0;
    padding:0;
    color:#d80;
}

/* =====================================================
   NON LOCAL IMAGE
=====================================================*/

.non-local-image{
    display:inline-block;
    border:3px dashed #eee;
    border-radius:5px;
}

.non-local-image:after{
    background:url(../logo.php) center center no-repeat;
    background-size:cover;
    content:"";
    width:100%;
    height:100%;
    display:block;
    opacity:0.3;
}

/* =====================================================
   DATE PICKER
=====================================================*/

input.dp{
    width:10em;
}

.ui-datepicker-trigger{
    display:inline-block;
    border:0;
    padding:0;
    margin-left:2px;
    position:relative;
    top:-2px;
    width:16px;
    height:16px;
}

/* =====================================================
   DRAFT MESSAGE
=====================================================*/

.draft-saved{
    background:rgba(0,0,0,0.7);
    color:white;
    padding:4px 8px 6px;
    border-radius:3px;
    text-shadow:0 -1px 0 rgba(0,0,0,0.25);
    line-height:14px;
    position:absolute;
    top:3em;
    right:0.5em;
}

.delete-draft:hover{
    background-color:#fc9f41 !important;
}

/* =====================================================
   ALERT BARS
=====================================================*/

.notice_bar,
.warning_bar,
.error_bar{
    margin:0;
    padding:5px 10px 5px 36px;
    height:16px;
    line-height:16px;
}

.notice_bar{
    border:1px solid #0a0;
    background:url('../assets/default/images/icons/ok.png') 10px 50% no-repeat #e0ffe0;
}

.warning_bar{
    border:1px solid #f26522;
    background:url('../assets/default/images/icons/alert.png') 10px 50% no-repeat #ffffdd;
}

.error_bar{
    border:1px solid #a00;
    background:url('../assets/default/images/icons/error.png') 10px 50% no-repeat #fff0f0;
}

/* =====================================================
   LANDING PAGE LAYOUT
=====================================================*/

#landing_page{
    display:flex;
    gap:20px;
}

#landing_page .sidebar{
    width:300px;
}

#landing_page .main-content{
    flex:1;
}

/* =====================================================
   KNOWLEDGE BASE SEARCH
=====================================================*/

.search-form{
    margin-bottom:20px;
}

.search-form form{
    display:flex;
    gap:10px;
}

.search-form input.search{
    width:70%;
    padding:8px;
}

.search-form button{
    width:25%;
    padding:8px;
}

/* =====================================================
   TABLE RESPONSIVE SUPPORT
=====================================================*/

table{
    width:100%;
    border-collapse:collapse;
}

table td,
table th{
    padding:8px;
}

/* =====================================================
   FORM FIELDS
=====================================================*/

input[type=text],
input[type=email],
select,
textarea{
    max-width:100%;
}

/* =====================================================
   MOBILE RESPONSIVE
=====================================================*/

@media screen and (max-width:768px){

    /* Layout */

    #landing_page{
        flex-direction:column;
    }

    #landing_page .sidebar{
        width:100%;
    }

    .main-content{
        width:100%;
    }

    /* Search */

    .search-form form{
        flex-direction:column;
    }

    .search-form input.search{
        width:100%;
        margin-bottom:10px;
    }

    .search-form button{
        width:100%;
    }

    /* Loading box */

    #loading{
        width:90%;
        min-width:280px;
        padding:10px;
        height:auto;
        text-align:center;
    }

    #loading h4{
        font-size:16px;
        line-height:1.4;
    }

    /* Images */

    .non-local-image{
        display:block;
        width:100%;
        height:200px;
    }

    .non-local-image:after{
        opacity:0.4;
    }

    /* Inputs */

    input.dp{
        width:100%;
    }

    .ui-datepicker-trigger{
        width:20px;
        height:20px;
        margin-left:5px;
    }

    /* Draft */

    .draft-saved{
        font-size:12px;
        top:2em;
        right:1em;
    }

    /* Alerts */

    .notice_bar,
    .warning_bar,
    .error_bar{
        padding:5px 10px;
        height:auto;
        line-height:1.5;
        font-size:14px;
    }

    /* Pull right fix */

    .pull-right{
        float:none;
        text-align:center;
    }

}

/* =====================================================
   SMALL PHONES
=====================================================*/

@media screen and (max-width:480px){

    #loading{
        width:95%;
        min-width:250px;
    }

    .non-local-image{
        height:150px;
    }

    .non-local-image:after{
        opacity:0.5;
    }

    .draft-saved{
        font-size:10px;
        top:1.5em;
        right:0.5em;
    }

    .notice_bar,
    .warning_bar,
    .error_bar{
        font-size:13px;
        line-height:1.4;
    }

}
