/* FONT STACK */
body,
input, select, textarea {
    font-family: "Open Sans", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
}

/* BASE LAYOUT */

html {
    background-color: #ddd;
    background-image: -moz-linear-gradient(center top, #aaa, #ddd);
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #aaa), color-stop(1, #ddd));
    background-image: linear-gradient(to bottom, #aaa, #ddd);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#aaaaaa', EndColorStr = '#dddddd');
    background-repeat: no-repeat;
    height: 100%;
    /* change the box model to exclude the padding from the calculation of 100% height (IE8+) */
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html.no-cssgradients {
    background-color: #aaa;
}

html * {
    margin: 0;
}

body {
    background-color: #F5F5F5;
    color: #333333;
    overflow-x: hidden; /* prevents box-shadow causing a horizontal scrollbar in firefox when viewport < 960px wide */
    -moz-box-shadow: 0 0 0.3em #424649;
    -webkit-box-shadow: 0 0 0.3em #424649;
    box-shadow: 0 0 0.3em #424649;
}

#grailsLogo {
    background-color: #feb672;
}

a:hover, a:active {
    outline: none; /* prevents outline in webkit on active links but retains it for tab focus */
}

h1, h2, h3 {
    font-weight: normal;
    font-size: 1.25em;
    margin: 0.8em 0 0.3em 0;
}

ul {
    padding: 0;
}

img {
    border: 0;
}

/* GENERAL */

#grailsLogo a {
    display: inline-block;
    margin: 1em;
}

.content {
    overflow-x: auto;
    overflow-y: auto;
}

.content h1 {
    padding: 0 0 1em 0;
}

.scaffold-list h1 {
    border: none;
}

.footer img {
    height: 80px;
    margin-right: 25px;
    margin-bottom: 15px;
    clear: bottom;
}

.footer strong a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

.footer {
    background: #424649;
    color: #ffffff;
    clear: both;
    font-size: 1em;
    padding: 2em 0;
    min-height: 1em;
}

.footer a {
    color: #feb672;
}

.spinner {
    background: url(../images/spinner.gif) 50% 50% no-repeat transparent;
    height: 16px;
    width: 16px;
    padding: 0.5em;
    position: absolute;
    right: 0;
    top: 0;
    text-indent: -9999px;
}

/* NAVIGATION MENU */

.nav {
    zoom: 1;
}

.nav ul {
    overflow: hidden;
    padding-left: 0;
    zoom: 1;
}

.nav li {
    display: block;
    float: left;
    list-style-type: none;
    margin-right: 0.5em;
    padding: 0;
}

.nav a {
    color: #666666;
    display: block;
    padding: 0.25em 0.7em;
    text-decoration: none;
    -moz-border-radius: 0.3em;
    -webkit-border-radius: 0.3em;
    border-radius: 0.3em;
}

.nav li.dropdown-item a {
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    border-radius: 0;
}

.nav a:active, .nav a:visited {
    color: #666666;
}

.nav a:focus, .nav a:hover {
    background-color: #999999;
    color: #ffffff;
    outline: none;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.no-borderradius .nav a:focus, .no-borderradius .nav a:hover {
    background-color: transparent;
    color: #444444;
    text-decoration: underline;
}

.nav a.home, .nav a.list, .nav a.create, .nav a.edit, .nav a.delete {
    background-position: 0.7em center;
    background-repeat: no-repeat;
    text-indent: 25px;
}

.nav a.home {
    background-image: url(../images/skin/house.png);
}

.nav a.list {
    background-image: url(../images/skin/database_table.png);
}

.nav a.create {
    background-image: url(../images/skin/database_add.png);
}

.nav a.delete {
    background-image: url(../images/skin/database_delete.png);
}

.nav a.edit {
    background-image: url(../images/skin/database_edit.png);
}

.nav li.dropdown.show ul.dropdown-menu {
    background-color: #424649;
}

/* CREATE/EDIT FORMS AND SHOW PAGES */

fieldset,
.property-list {
    margin: 0.6em 1.25em 0 1.25em;
    padding: 0.3em 1.8em 1.25em;
    position: relative;
    zoom: 1;
    border: none;
}

.property-list .fieldcontain {
    list-style: none;
    overflow: visible;
    width: 100%;
    display: inline-block;
    zoom: 1;
}

.fieldcontain {
    margin-top: 1em;
}

.fieldcontain .field-label-col {
    display: inline-block;
    width: 25%;
    vertical-align: top;
    text-align: right;
    padding-right: 0.5em;
}

.fieldcontain .field-label-col label {
    display: block;
    width: 100%;
    text-align: right;
}

.fieldcontain .field-description {
    display: block;
    font-size: 0.85em;
    text-align: right;
    color: #888;
}

.fieldcontain .field-input-col {
    display: inline-block;
    vertical-align: top;
    width: 74%;
}

.fieldcontain label,
.fieldcontain .property-label {
    color: #666666;
    text-align: right;
    width: 25%;
}

.fieldcontain .property-label {
    float: left;
}

.fieldcontain .property-value {
    display: block;
    margin-left: 27%;
}

label {
    cursor: pointer;
    display: inline-block;
    margin: 0 0.5em 0 0;
}

input, select, textarea {
    background-color: #fcfcfc;
    border: 1px solid #cccccc;
    font-size: 1em;
    padding: 0.2em 0.4em;
}

select {
    padding: 0.2em 0.2em 0.2em 0;
}

select[multiple] {
    vertical-align: top;
}

textarea {
    width: 650px;
    height: 250px;
    overflow: auto; /* IE always renders vertical scrollbar without this */
    vertical-align: top;
}

/* Not applied to Bootstrap's .form-check-input: that class draws the box itself
   (appearance: none) with a border and background, and this reset - being more specific -
   stripped both, leaving an unticked Bootstrap checkbox completely invisible. */
input[type=checkbox]:not(.form-check-input), input[type=radio]:not(.form-check-input) {
    background-color: transparent;
    border: 0;
    padding: 0;
}

/* Checkboxes and radios, site-wide: big enough and outlined strongly enough to be seen
   at a glance, whether Bootstrap-styled or the browser's native control. */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
    border: 2px solid #6c757d;
    background-color: #fff;
    cursor: pointer;
}
.form-check-input:hover { border-color: #0d6efd; }
.form-check-input:focus { border-color: #0d6efd; box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25); }
.form-check-input:checked { background-color: #0d6efd; border-color: #0d6efd; }
.form-check-input:disabled { cursor: default; }
.form-check-label { cursor: pointer; }
input[type=checkbox]:not(.form-check-input), input[type=radio]:not(.form-check-input) {
    width: 1.2em;
    height: 1.2em;
    accent-color: #0d6efd;
    cursor: pointer;
    vertical-align: middle;
}

.required-indicator {
    color: #cc0000;
    display: inline-block;
    font-weight: bold;
    margin-left: 0.3em;
    position: relative;
    top: 0.1em;
}

ul.one-to-many {
    display: inline-block;
    list-style-position: inside;
    vertical-align: top;
}

ul.one-to-many li.add {
    list-style-type: none;
}

/* EMBEDDED PROPERTIES */

fieldset.embedded {
    background-color: transparent;
    border: 1px solid #CCCCCC;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

fieldset.embedded legend {
    margin: 0 1em;
}

/* MESSAGES AND ERRORS */

.errors,
.message {
    margin: 1em 0;
    padding: 0.5em;
}

.message {
    background: #f3f3ff;
    border: 1px solid #b2d1ff;
    color: #006dba;
    -moz-box-shadow: 0 0 0.25em #b2d1ff;
    -webkit-box-shadow: 0 0 0.25em #b2d1ff;
    box-shadow: 0 0 0.25em #b2d1ff;
}

.errors {
    background: #fff3f3;
    border: 1px solid #ffaaaa;
    color: #cc0000;
    -moz-box-shadow: 0 0 0.25em #ff8888;
    -webkit-box-shadow: 0 0 0.25em #ff8888;
    box-shadow: 0 0 0.25em #ff8888;
}

.errors ul,
.message {
    padding: 0;
}

.errors li {
    list-style: none;
    background: transparent url(../images/skin/exclamation.png) 0.5em 50% no-repeat;
    text-indent: 2.2em;
}

.message {
    background: transparent url(../images/skin/information.png) 0.5em 50% no-repeat;
    text-indent: 2.2em;
}

/* form fields with errors */

.error input, .error select, .error textarea {
    background: #fff3f3;
    border-color: #ffaaaa;
    color: #cc0000;
}

.error input:focus, .error select:focus, .error textarea:focus {
    -moz-box-shadow: 0 0 0.5em #ffaaaa;
    -webkit-box-shadow: 0 0 0.5em #ffaaaa;
    box-shadow: 0 0 0.5em #ffaaaa;
}

/* same effects for browsers that support HTML5 client-side validation (these have to be specified separately or IE will ignore the entire rule) */

input:invalid, select:invalid, textarea:invalid {
    background: #fff3f3;
    border-color: #ffaaaa;
    color: #cc0000;
}

input:invalid:focus, select:invalid:focus, textarea:invalid:focus {
    -moz-box-shadow: 0 0 0.5em #ffaaaa;
    -webkit-box-shadow: 0 0 0.5em #ffaaaa;
    box-shadow: 0 0 0.5em #ffaaaa;
}

/* TABLES */

table {
    border: 1px solid #DFDFDF;
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

tr {
    border: 0;
}

tr>td:first-child, tr>th:first-child {
    padding-left: 1.25em;
}

tr>td:last-child, tr>th:last-child {
    padding-right: 1.25em;
}

td, th {
    line-height: 1.5em;
    padding: 0.5em 0.6em;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #efefef;
    background-image: -moz-linear-gradient(top, #ffffff, #eaeaea);
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), color-stop(1, #eaeaea));
    filter: progid:DXImageTransform.Microsoft.gradient(startColorStr = '#ffffff', EndColorStr = '#eaeaea');
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#ffffff', EndColorStr='#eaeaea')";
    color: #666666;
    font-weight: bold;
    line-height: 1.7em;
    padding: 0.2em 0.6em;
}

thead th {
    white-space: nowrap;
}

th a {
    display: block;
    text-decoration: none;
}

th a:link, th a:visited {
    color: #666666;
}

th a:hover, th a:focus {
    color: #333333;
}

th.sortable a {
    background-position: right;
    background-repeat: no-repeat;
    padding-right: 1.1em;
}

th.asc a {
    background-image: url(../images/skin/sorted_asc.gif);
}

th.desc a {
    background-image: url(../images/skin/sorted_desc.gif);
}

.odd {
    background: #f7f7f7;
}

.even {
    background: #ffffff;
}

th:hover, tr:hover {
    background: #f5f5f5;
}

/* PAGINATION */

.pagination {
    border-top: 0;
    margin: 0.8em 1em 0.3em;
    padding: 0.3em 0.2em;
    text-align: center;
    -moz-box-shadow: 0 0 3px 1px #AAAAAA;
    -webkit-box-shadow: 0 0 3px 1px #AAAAAA;
    box-shadow: 0 0 3px 1px #AAAAAA;
    background-color: #EFEFEF;
}

.pagination a,
.pagination .currentStep {
    color: #666666;
    display: inline-block;
    margin: 0 0.1em;
    padding: 0.25em 0.7em;
    text-decoration: none;
    -moz-border-radius: 0.3em;
    -webkit-border-radius: 0.3em;
    border-radius: 0.3em;
}

.pagination a:hover, .pagination a:focus,
.pagination .currentStep {
    background-color: #999999;
    color: #ffffff;
    outline: none;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.no-borderradius .pagination a:hover, .no-borderradius .pagination a:focus,
.no-borderradius .pagination .currentStep {
    background-color: transparent;
    color: #444444;
    text-decoration: underline;
}

/* ACTION BUTTONS */

.buttons {
    background-color: #efefef;
    overflow: hidden;
    padding: 0.3em;
    -moz-box-shadow: 0 0 3px 1px #aaaaaa;
    -webkit-box-shadow: 0 0 3px 1px #aaaaaa;
    box-shadow: 0 0 3px 1px #aaaaaa;
    margin: 0.1em 0 0 0;
    border: none;
}

.buttons input,
.buttons a {
    background-color: transparent;
    border: 0;
    color: #666666;
    cursor: pointer;
    display: inline-block;
    margin: 0 0.25em 0;
    overflow: visible;
    padding: 0.25em 0.7em;
    text-decoration: none;

    -moz-border-radius: 0.3em;
    -webkit-border-radius: 0.3em;
    border-radius: 0.3em;
}

.buttons input:hover, .buttons input:focus,
.buttons a:hover, .buttons a:focus {
    background-color: #999999;
    color: #ffffff;
    outline: none;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.no-borderradius .buttons input:hover, .no-borderradius .buttons input:focus,
.no-borderradius .buttons a:hover, .no-borderradius .buttons a:focus {
    background-color: transparent;
    color: #444444;
    text-decoration: underline;
}

.buttons .delete, .buttons .edit, .buttons .save {
    background-position: 0.7em center;
    background-repeat: no-repeat;
    text-indent: 25px;
}

.buttons .delete {
    background-image: url(../images/skin/database_delete.png);
}

.buttons .edit {
    background-image: url(../images/skin/database_edit.png);
}

.buttons .save {
    background-image: url(../images/skin/database_save.png);
}

a.skip {
    position: absolute;
    left: -9999px;
}

.grails-logo-container {
    background: #7c7c7c no-repeat 50% 30%;
    margin-bottom: 20px;
    color: white;
    height:300px;
    text-align:center;
}

img.grails-logo {
    height:340px;
    margin-top:-10px;
}

div.fieldcontain .select2-container--open {
    z-index: 50000;
}

.select2-container--open {
    z-index: 50000;
}

.fieldcontain .select2-search--dropdown input {
    z-index: 50000;
}

.fieldcontain .select2-container {
    z-index: 2000;
}

.tagify__dropdown {
    z-index: 2000;
}

.navbar .megamenu{ padding: 1rem; }
/* ============ desktop view ============ */
@media all and (min-width: 992px) {

	nav .has-megamenu{position:static!important;}
	nav .megamenu{left:0; right:0; width:100%; margin-top:0; max-height: 80vh; overflow-y: auto; }

}
/* ============ desktop view .end// ============ */


/* ============ mobile view ============ */
@media(max-width: 991px){
	.navbar.fixed-top .navbar-collapse, .navbar.sticky-top .navbar-collapse{
		overflow-y: auto;
	    max-height: 90vh;
	    margin-top:10px;
	}
	.megamenu {
		max-height: 70vh;
		overflow-y: auto;
	}
}
/* ============ mobile view .end// ============ */

.sidebar-nav .nav-item .nav-content a i {
    font-size: 14px;
}

.sidebar-nav .nav-item .nav-content a img {
    margin-right: 10px;
}

.csdnav li {
    display: inline;
    padding: 0.5em;
    margin: 0;
    border-top: 1px solid black;
    border-left: 1px solid black;
    border-right: 1px solid black;
}

/* 

Got from https://css-tricks.com/responsive-data-tables/

Max width before this PARTICULAR table gets nasty
This query will take effect for any screen smaller than 760px
and also iPads specifically.
*/
@media 
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px)  {

	/* Force table to not be like tables anymore */
	table.responsive, .responsive thead, .responsive tbody, .responsive th, .responsive td, .responsive tr { 
		display: block; 
	}
	
	/* Hide table headers (but not display: none;, for accessibility) */
	table.responsive thead tr { 
		position: absolute;
		top: -9999px;
		left: -9999px;
	}
	
	table.responsive tr { 
    border: 1px solid #ccc; 
  }

  table.responsive tr:nth-child(odd) {
      background: #ccc;
  }
	
	table.responsive td { 
		/* Behave  like a "row" */
		border: none;
		border-bottom: 1px solid #eee; 
		position: relative;
		padding-left: 50%; 
	}
	
	table.responsive td:before { 
		/* Now like a table header */
		position: absolute;
		/* Top/left values mimic padding */		
		left: 6px;
		width: 45%; 
		padding-right: 10px; 
		white-space: nowrap;
    height: 1.5em;
	}
}
