/* dimmers: dimm a component by making it half-whittened. use like this:
    <div class="I want this component to be dimmed" class="dimmable">
        <div class="dimmer"></div>
    </div>

    Dimmer only works if its dimmable has a class "dimmed"
    Add class 'disabled' to disable the dimmer
    Add class 'patial' to gain control over the dimmer's bounds
 */

.dimmer {
    background: rgba(255, 255, 255, 0.5);
}

.dimmer.disabled {
    display: none;
}

.dimmer:not(.partial) {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.dimmable {
    position: relative;
}

.dimmable:not(.dimmed) .dimmer {
    display: none;
}

/* loaders: show the loading animation. Use inside a dimmer, like this:
    <div id="I want the loader to be shown on this component" class="dimmable">
        <div class="dimmer">
            <div class="loader"></div>
        </div>
    </div>

    Use the extra classes (slow-extreme, counter-clockwise, tiny-huge)
    To add custom style to the loader
 */

.loader {
    border-radius: 1em;
    width: 1em;
    height: 1em;
    animation: spin-clockwise 1.5s linear infinite;
    font-size: 5vw;

    border: 0.05em solid lightgray;
    border-top: 0.05em solid gray;
}

.loader.slow { animation-duration: 2s; }
.loader.slower { animation-duration: 2.5s; }
.loader.slowest { animation-duration: 3s; }

.loader.fast { animation-duration: 1s; }
.loader.faster { animation-duration: 0.75s; }
.loader.fastest { animation-duration: 0.5s; }
.loader.extreme { animation-duration: 0.2s; }

.loader.counter-clockwise { animation-name: spin-counter-clockwise; }

.loader.tiny { font-size: initial; }
.loader.small { font-size: 2vw; }
.loader.big { font-size: 10vw; }
.loader.large { font-size: 15vw; }
.loader.huge { font-size: 25vw; }

@keyframes spin-clockwise {
    0% { transform: rotate(0deg);  }
    100% { transform: rotate(360deg);  }
}

@keyframes spin-counter-clockwise {
    0% { transform: rotate(0deg);  }
    100% { transform: rotate(-360deg);  }
}

/* icons */

i.material-icons[ng-click] {
    cursor: pointer;
    margin: 0.25em;
}

i.material-icons.big {
    font-size: 2em;
}

/* tabs */
.nav-tabs > li {
    cursor: pointer;
}

/*
* "fluid" class: the first child of an element with this class will take the whole width of the parent element.
*/

.fluid {
	display: flex;
}

.fluid :first-child {
	flex: 1;
}

/*
* "center" class: the children of an element with this class will be centered
*/

.center {
    display: flex;
    align-items: center;
    justify-content: center;
}

    /*
* "toolbar" class: describes a toolbar. Any element in it will baecome an element in the toolbar
*/
.toolbar {
	display: flex;
	width: 100%;
    align-items: center;
}

/*
* "card" class: describes a content card.
*/

.card {
    background: #fff;
    border-color: whitesmoke;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
    margin: 1em;
}

.card.main {
    flex: 1;
}

.card .card-header {
    padding: 1em;
    font-size: 1.5rem;
    line-height: 1.5rem;
    margin: 0;
}

.card .card-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.card .card-header i.material-icons {
    vertical-align: bottom;
}


.card .card-top .card-menu {
    padding: 1.5rem;
    margin: 0;
}

.card .card-top .card-menu > * {
    display: inline-block;
}

.card .card-top .card-menu input {
    margin: 0;
}

.card .card-body {
    padding: 1em;
}

/* ng-datatble directive global styles */

ng-datatable table {
    height: 100%;
    margin-bottom: 0 !important; /* Overrides bootstrap */
}

ng-datatable thead td i.material-icons {
    margin: 0 !important;
    vertical-align: middle;
}

ng-datatable tr {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 4em;
}

ng-datatable td {
    min-width: 3em;
    overflow-y: hidden;
}

ng-datatable td > * {
    margin-top: 0.5em;
    display: block;
}

ng-datatable .actions .btn-group {
    float: right;
}

ng-datatable .actions .btn {
    margin-top: 0.2em;
    padding: 0.3em 0.5em 0 0.5em;
}

ng-datatable .editing-form {
    display: flex;
}

ng-datatable .editing-form .input-container {
    width: 0;
    flex: 1;
}

ng-datatable .editing-form input, ng-datatable .editing-form select {
    width: 100%;
}

ng-datatable .editing-form i.material-icons {
    font-size: 1.5em;
    margin: 0 !important;
    vertical-align: middle;
    padding: 0.15em 0 0 0;
    flex: 0;
}

ng-datatable td.create-message {
    flex: 22.5;
    font-size: 2rem;
    text-align: center;
    cursor: pointer;
}

ng-datatable.scrollable-body thead {
    display: block;
    width: 100%;
}

ng-datatable.scrollable-body tbody {
    overflow-y: auto;
    display: block;
    width: 100%;
}

ng-datatable td.editable:not(.actions) {
    cursor: pointer;
}

ng-datatable td.editable:not(.actions):hover {
    background: lightgray;
}
