/* Utils */
.caret {
    color: gray;
}

.caret.caret-right {
    border-left: 5px dashed;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.caret.caret-left {
    border-right: 5px dashed;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.text-editor-theme {
    color: #037691 !important;
}

.text-editor-error {
    color: crimson !important;
}

.text-editor-default {
    color: #333 !important;
}

/* Editor */
.spreadsheet-editor {
    width: 100%;
}

.spreadsheet-editor .se-titlebar {
    width: 100%;
    background-color: #037691;
    /* background-color: #167741; */
    /* background-color: #0D2842; */
    color: white;
    padding: 8px 16px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.spreadsheet-editor .se-navbar {
    /* height: 32px; */
    background-color: #f8f8f8;
    border-color: #e7e7e7;
}

.spreadsheet-editor .se-ribbon .container-fluid,
.spreadsheet-editor .se-navbar .container-fluid {
    padding-left: 8px;
    padding-right: 8px;
}

.spreadsheet-editor .se-editor .container-fluid {
    padding: 0;
}

/* Editor */
.spreadsheet-editor .se-editor {
    overflow-x: scroll;
    overflow-y: scroll;
    position: relative;
    min-height: 300px;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar {
    width: initial;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar-track {
    box-shadow: initial;
    border-radius: initial;
    /* background-color: #f1f1f1; */
    background-color: #e2e2e2;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar-corner {
    background-color: #f1f1f1;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar-button {
    /* background-color: #d6d6d6; */
    background-color: #c3c3c3;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar-thumb {
    background: #c3c3c3;
    border-radius: initial;
}

.spreadsheet-editor .se-editor::-webkit-scrollbar-thumb:hover {
    background: #b3b3b3;
}

.spreadsheet-editor .se-editor .se-editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.06);
}

.spreadsheet-editor .se-editor .se-editor-overlay .fa {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 2.5rem;
    color: #037691;
    /* color: #167741; */
    cursor: cell;
    /* color: #0D2842; */
}

/* Editor grid */
.spreadsheet-editor table.se-editor-grid {
    width: 100%;
    box-sizing: border-box;
}

.spreadsheet-editor table.se-editor-grid .se-row-meta {
    cursor: default;
    text-align: center;
    background-color: #f1f1f1;
    border-color: #c5c5c5;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-row-meta {
    cursor: default;
    font-size: 10px;
    user-select: none;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell {
    cursor: cell;
    position: relative;
}

/* Not being used */
.spreadsheet-editor table.se-editor-grid tbody > tr > td.se-cell > .se-cell-outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: -1px;
    border: 2px solid #037691;
    /* border: 2px solid #167741; */
    visibility: hidden;
}

.spreadsheet-editor table.se-editor-grid tbody > tr > td.se-cell.se-active > .se-cell-outline {
    visibility: visible;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-active > .se-cell-editor {
    outline: 2px solid #037691;
    /* outline: 2px solid #167741; */
    outline-offset: -1px; /* account for td border */
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-drag-handle {
    position: absolute;
    height: 10px;
    width: 10px;
    right: -4px;
    bottom: -4px;
    z-index: 800;
    /* background-color: #167741; */
    background-color: #037691;
    cursor: crosshair;
    display: none;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr.se-selected > td.se-cell > .se-drag-handle {
    display: none !important;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-active > .se-drag-handle {
    display: block;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-drag-handle:before {
    position: absolute;
    content: '';
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 700;
    padding: 4px;
    border: 1px solid #fff;
    cursor: crosshair;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-invalid-cell {
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-invalid-cell:after {
    position: absolute;
    content: '';
    top: 0;
    right: 0;
    border-bottom: 4px solid transparent;
    border-left: 4px solid transparent;
    border-top: 4px solid crimson;
    border-right: 4px solid crimson;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell:nth-last-of-type(-n + 3).se-invalid-cell:after {
    right: initial;
    border-right: initial;
    left: 0;
    border-bottom: 4px solid transparent;
    border-right: 4px solid transparent;
    border-left: 4px solid crimson;
    border-top: 4px solid crimson;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-error-popup {
    position: absolute;
    padding: 10px;
    top: 0;
    left: 100%;
    z-index: 800;
    border-left: 5px solid crimson;
    display: none;
    background-color: white;
    min-width: 200px;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-right-radius: 4px;
    border-top-left-radius: 0;
    cursor: default;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-error-popup > h5 {
    padding: 0;
    margin: 0;
    color: crimson;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-error-popup > ul {
    margin-top: 6px;
    margin-bottom: 0;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-error-popup > ul > li {
    line-height: 18px;
    font-size: 1.3rem;
    border-bottom: none;
    white-space: nowrap;
    color: #333;
}

/* Last 3 fields to prevent scroll */
.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell:nth-last-of-type(-n + 3) > .se-cell-error-popup {
    left: initial;
    right: 100%;
    border-left: initial;
    border-right: 5px solid crimson;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 0;
}

/* .se-active */
.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-invalid-cell.se-active > .se-cell-error-popup,
.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-invalid-cell:hover > .se-cell-error-popup {
    display: block;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-readonly-cell.se-occupied-row input {
    background-color: #f5f5f5 !important;
    color: #a1a1a1;
    cursor: not-allowed;
}

/* hide when input has focus*/
.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-invalid-cell.se-cell-focused > .se-cell-error-popup {
    display: none;
}

.spreadsheet-editor table.se-editor-grid > thead > tr > th {
    background-color: #f1f1f1;
    padding: 4px;
    color: #797979 !important;
    cursor: default;
    font-weight: normal;
    white-space: nowrap;
}

.spreadsheet-editor table.se-editor-grid > thead > tr > th,
.spreadsheet-editor table.se-editor-grid > tbody > tr > td {
    border: 1px solid #dadada;
}

.spreadsheet-editor .se-editor .se-header-overlay {
    border-collapse: collapse;
    display: table-row;
    position: absolute;
    z-index: 900; /* Render beneath menu, menu = 1000 */
    top: 0;
    left: 0;
}

.spreadsheet-editor .se-editor .se-header-overlay .se-cell-header-overlay {
    display: table-cell;
    padding: 4px;
    /* color: #797979 !important; */
    color: rgb(30, 40, 66) !important;
    background-color: #f1f1f1;
    user-select: none;
    white-space: nowrap;
}

.spreadsheet-editor .se-editor .se-header-overlay .se-cell-header-overlay {
    border: 1px solid #c5c5c5;
}

.spreadsheet-editor .se-editor .se-header-overlay .se-cell-header-overlay:last-child {
    border-right: 1px solid #c5c5c5;
}

.spreadsheet-editor .se-editor .se-header-overlay .se-cell-header-overlay.se-field-header {
    /* font-weight: bold; */
}

.spreadsheet-editor table.se-editor-grid > tbody > tr.se-active > td.se-row-meta {
    /* background-color: #d6d6d6; */
    background-color: #dadada;
}

.spreadsheet-editor .se-editor > .se-header-overlay > .se-field-header.se-active {
    background-color: #dadada;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr.se-selected > td.se-row-meta {
    color: white;
    background-color: #5f5f5f;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr.se-selected > td.se-cell {
    background-color: rgba(3, 119, 145, 0.04);
    /* background-color: rgba(22, 121, 66, 0.04); */
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-selected {
    background-color: rgba(3, 119, 145, 0.04);
    /* background-color: rgba(22, 121, 66, 0.04); */
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor {
    width: 100%;
    height: 100%;
    background-color: inherit;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input {
    box-sizing: border-box;
    border-collapse: collapse;
    height: 100%;
    width: 100%;
    border: none;
    padding: 2px 4px;
    font-size: 12px;
    background-color: inherit;
    cursor: cell;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input[readonly='readonly'] {
    pointer-events: none;
 }

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input::-webkit-outer-spin-button,
.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input[type=number] {
    -moz-appearance:textfield;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell > .se-cell-editor input:focus {
    background-color: #fff;
    cursor: auto;
}

.spreadsheet-editor table.se-editor-grid > tbody > tr > td.se-cell.se-cell-focused > .se-cell-editor  {
    /* transform: perspective(200px) translateZ(2px); */
}

/* Cell editor related */
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown {
    position: absolute;
    z-index: 800; /* Place above error popup */
    top: 100%;
    left: 0;
    /* right: 1px; */
    min-width: 100%;
    margin-top: 1px;
    max-height: 250px;
    overflow-y: auto;
    cursor: default;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
    display: none;
    background-color: #fff;
}

.spreadsheet-editor table.se-editor-grid td.se-cell.se-cell-focused ul.se-autocomplete-dropdown {
    display: block;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown::-webkit-scrollbar-track {
    box-shadow: initial;
    border-radius: initial;
    background-color: #f1f1f1;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background-color: #c3c3c3;
    border-radius: initial;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li {
    list-style: none;
    list-style-type: none;
    user-select: none;
    font-size: 12px;
    line-height: 22px;
    white-space: nowrap;
    padding: 0 4px;
    color: #333;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li.se-active,
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li:hover {
    background-color: #e0e0e0;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li.se-selected {
    background-color: rgba(3, 119, 145, 0.2) !important;
    /* background-color: rgba(22, 121, 66, 0.2) !important; */
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li.se-placeholder {
    /* color: #a94442; */
    color: crimson;
    border-bottom: none;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-autocomplete-dropdown > li.se-placeholder:hover {
    background-color: initial !important;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown {
    background-color: #fff;
    border: none;
    margin-top: 1px;
    border: none;
    padding: 2px;
    min-width: 100%;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown > li {
    border-bottom: none;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table {
    width: 100%;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th {
    cursor: default;
}

/* Week names */
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th small {
    color: #037691;
    /* color: #167741; */
    /* color: #037691; */
    font-weight: normal;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th button strong {
    /* font-weight: normal; */
    font-weight: 600;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th button .glyphicon.glyphicon-chevron-right,
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th button .glyphicon.glyphicon-chevron-left {
    font-weight: normal;
    line-height: initial;
}

/* Date cells */
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table td button.btn,
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table th button.btn {
    border: none;
    font-size: 12px;
    padding: 4px 8px;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table td button.btn.active {
    color: #fff;
    background-color: rgba(3, 119, 145, 0.9);
    /* background-color: rgba(22, 121, 66, 0.9); */
    /* background-color: #167741; */
    /* background-color: #037691; */
}

/* Current day, month, year */
.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table td button.btn .text-info {
    /* color: #037691; */
    color: crimson;
}

.spreadsheet-editor table.se-editor-grid td.se-cell ul.se-datepicker-dropdown table td button.btn.active .text-info {
    color: #fff;
}

/* Menu bar */
.spreadsheet-editor ul.se-menubar {
    float: left;
    margin-bottom: 0;
}

.spreadsheet-editor ul.se-menubar li {
    border-bottom: none;
}

.spreadsheet-editor ul.se-menubar > li {
    float: left;
    line-height: 32px;
}

.spreadsheet-editor ul.se-menubar li.se-active > a {
    background-color: #e0e0e0;
}

.spreadsheet-editor ul.se-menubar > li > a .caret {
    display: none;
}

.spreadsheet-editor ul.se-menubar .dropdown-menu > li {
    border-bottom: none;
}

.spreadsheet-editor ul.se-menubar > li + li {
    margin-left: 2px;
}

.spreadsheet-editor ul.se-menubar > li > a {
    padding: 4px 8px;
    border-radius: 4px;
    color: black;
}

.spreadsheet-editor ul.se-menubar li:hover > a {
    background-color: #ececec;
    /* background-color: #e6f4ea; google docs menu highlight (on focus) color */
}

.spreadsheet-editor ul.se-menubar li:hover > .dropdown-menu {
    display: block;
}

.spreadsheet-editor ul.se-menubar li:not(:hover) > .dropdown-menu {
    display: none;
}

.spreadsheet-editor ul.se-menubar li:not(.divider):not(:hover) > a {
    /* background-color: #fff; */
}

.spreadsheet-editor ul.se-menubar > li:hover > a {
    text-decoration: none;
    background-color: #e0e0e0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.spreadsheet-editor ul.se-menubar > li:hover > a {
    text-decoration: none;
    background-color: #e0e0e0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Dropdown menu */
.spreadsheet-editor ul.se-dropdown-menu > li > a {
    padding: 5px 10px;
}

.spreadsheet-editor ul.se-dropdown-menu > li.divider {
    margin: 6px 0;
}

.spreadsheet-editor ul.se-dropdown-menu > li > a > .caret {
    float: right;
    margin-top: 6px;
}

.spreadsheet-editor ul.se-dropdown-menu > li:hover > a > .caret,
.spreadsheet-editor ul.se-dropdown-menu > li:hover > a > .caret {
    color: #333;
}

.spreadsheet-editor ul.se-dropdown-menu .se-menu-anchor {
    display: inline-block;
    vertical-align: middle;
}

.spreadsheet-editor ul.se-dropdown-menu .se-menu-anchor.se-icon {
    /* margin-right: 4px; */
    width: 16px;
}

.spreadsheet-editor ul.se-dropdown-menu .se-menu-anchor.se-action {
    margin-left: 4px;
}

.spreadsheet-editor ul.se-menubar .se-dropdown-menu {
    border-top-left-radius: 0;
    border: none;
    margin-top: -2px;
    overflow: visible;
    padding: 9px 0;
    max-height: inherit;
}

.spreadsheet-editor ul.se-menubar .se-dropdown-menu .se-dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -2px;
}

/* Ribbon */
.spreadsheet-editor .se-ribbon {
    background-color: #f8f8f8;
    padding: 4px 16px 8px;
    max-height: 64px;
    /* overflow: auto; */
}

.spreadsheet-editor .se-ribbon .se-save-button {
    float: left;
}

.spreadsheet-editor .se-ribbon .se-save-button button {
    font-size: 12px;
    /* background-color: #037691;
    color: #fff; */
}

.spreadsheet-editor .se-ribbon .se-save-button i {
    font-size: 20px;
}

.spreadsheet-editor .se-ribbon .se-notification-container {
    /* height: 100%; */
    /* overflow: auto; */
}

.spreadsheet-editor .se-ribbon .se-notification-container ul.se-notification-list {
    margin-bottom: 0;
    list-style: none;
    list-style-type: none;
    user-select: none;
    margin-right: 16px;
    margin-top: 8px;
}

.spreadsheet-editor .se-ribbon .se-notification-container ul.se-notification-list > li {
    font-size: 14px;
    line-height: 20px;
    border-bottom: none;
}

.spreadsheet-editor .se-ribbon .se-notification-container ul.se-notification-list > li > i {
    margin-right: 8px;
}

/* Widget container */
.spreadsheet-editor .se-editor .se-widget-container {
    font-size: 12px;
    padding: 16px;
    background-color: #f1f1f1;
}

.spreadsheet-editor .se-editor .se-widget-container .se-addrow-button  {
    padding: 4px 24px;
}

.spreadsheet-editor .se-editor .se-widget-container span {
    vertical-align: middle;
}
