@tailwind preflight;
@tailwind components;

:root {
  --transparent: transparent;
  --black: #22292f;
  --white: white;
  --white-50: rgba(255, 255, 255, 0.5);
  --danger: #e74444;
  --success: #21b978;
  --warning: #ffeb3b;
  --info: #03a9f4;
  --primary: #4099de;
  --primary-dark: #297ec0;
  --primary-70: rgba(64, 153, 222, 0.7);
  --primary-50: rgba(64, 153, 222, 0.5);
  --primary-30: rgba(64, 153, 222, 0.3);
  --primary-10: rgba(64, 153, 222, 0.1);
  --logo: #252d37;
  --sidebar-icon: #b3c1d1;
  --20: #f6fbff;
  --30: #f4f7fa;
  --40: #eef1f4;
  --50: #e3e7eb;
  --60: #bacad6;
  --70: #b3b9bf;
  --80: #7c858e;
  --90: #252d37;
  --90-half: rgba(40, 54, 61, 0.5);
}

/* Search
---------------------------------------------------------------------------- */
input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: searchfield-cancel-button;
}

.search-icon-center {
  top: 8px;
}

/* Content
---------------------------------------------------------------------------- */
.content {
  min-width: 66.25rem;
  width: 100%;
  max-width: calc(100vw - 13.75rem);
}

/* Background Image
---------------------------------------------------------------------------- */
.bg-grad-sidebar {
  background-image: linear-gradient(0deg, #7e8ea1 0%, #3c4655 100%);
}

/* Custom Padding
---------------------------------------------------------------------------- */

.pt-header {
  padding-top: 5.75rem;
}

.p-sidebar {
  padding-left: 13.75rem;
}

/* Card Components
---------------------------------------------------------------------------- */

.card {
  @apply .bg-white .shadow .rounded-lg;
}

.card-panel {
  height: 150px;
}

.card-refresh {
  @apply p-1 ml-auto text-80 inline-flex items-center;
}

.card-refresh:hover {
  @apply text-primary;
}

/* Tables
---------------------------------------------------------------------------- */
.table-fixed {
  table-layout: fixed;
}

.table {
  border-collapse: collapse;
  border-spacing: 0;
}

.table tr:hover td {
  @apply .bg-20;
}

.table th {
  @apply .bg-30 .font-bold .text-xs .text-80 .uppercase .border-b-2 .border-50 .py-3 .px-3 .tracking-wide .align-middle;
}

.table td {
  @apply .font-light .text-90 .border-t .border-b .border-50 .px-3 .align-middle;
  height: 3.8125rem;
}

.th-fit,
.td-fit {
  width: 1%;
  white-space: nowrap;
}

/* Forms
---------------------------------------------------------------------------- */

.form-control {
  @apply .h-9;
  line-height: normal;
}

.form-control-sm {
  @apply .h-8;
}

.form-input {
  @apply .bg-white .border .border-white .px-3 .text-80 .rounded-lg .shadow;
}

.form-control-focus {
  outline: none !important;
  box-shadow: 0 0 8px config('colors.primary') !important;
}

.form-input:focus,
.form-input:active {
  @apply .rounded-lg .form-control-focus;
}

.form-control-lg {
  @apply .h-12;
}

.form-input-bordered {
  @apply .bg-white .border .border-60 .px-3 .text-80 .rounded-lg .shadow;
}

.form-select {
  @apply .bg-white .border .border-60 .pl-3 .pr-8 .rounded-lg .text-80 .shadow;
  appearance: none;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  background-position: center right 0.75rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="%2335393C" fill-rule="nonzero" d="M8.293.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4A1 1 0 0 1 1.707.293L5 3.586 8.293.293z"/></svg>');
}

input.form-input:read-only,
textarea.form-input:read-only,
.form-input:active:disabled,
.form-input:focus:disabled,
.form-select:active:disabled,
.form-select:focus:disabled {
  box-shadow: none;
  @apply shadow;
}

input.form-input:read-only,
textarea.form-input:read-only,
.form-input:disabled,
.form-input.disabled,
.form-select:disabled {
  @apply .bg-30;
  cursor: not-allowed;
}

.form-select:focus {
  @apply .form-control-focus;
}

.form-combo {
  @apply .bg-white .border .border-60 .rounded-lg .text-80 .shadow .overflow-hidden;
}

.form-combo-select {
  @apply .bg-white .bg-transparent .pr-4;
  outline: none;
  background-repeat: no-repeat;
  background-size: 10px 6px;
  background-position: center right 0.75rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="#35393C" fill-rule="nonzero" d="M8.293.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4A1 1 0 0 1 1.707.293L5 3.586 8.293.293z"/></svg>');
}

/* Checkbox
---------------------------------------------------------------------------- */
.checkbox {
  outline: none;
}

.checkbox:focus {
  box-shadow: 0 0 8px config('colors.primary');
}

/* File Upload
---------------------------------------------------------------------------- */
.form-file {
  @apply .relative;
}

.form-file-btn {
}

.form-file-input {
  @apply .opacity-0 .overflow-hidden .absolute;
  width: 0.1px;
  height: 0.1px;
  z-index: -1;
}

.form-file-input:focus + .form-file-btn,
.form-file-input + .form-file-btn:hover {
  @apply .bg-primary-dark .cursor-pointer;
}

.form-file-input:focus + .form-file-btn {
  outline: none;
  box-shadow: 0 0 8px config('colors.primary');
}

/* Buttons
---------------------------------------------------------------------------- */
.btn {
  @apply .inline-block .no-underline .font-bold;
}

.form-control-focus-border:focus {
  outline: none;
  box-shadow: 0 0 8px config('colors.primary');
}

.btn-text-shadow {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-default {
  @apply .h-9 .px-6 .leading-36 .rounded-lg .shadow .btn-text-shadow;
}

.btn-disabled,
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-disabled:focus {
  outline: none;
}

.btn-default:not([disabled]):not(.btn-disabled):focus,
.btn-default:not([disabled]):not(.btn-disabled):active {
  outline: none;
  box-shadow: 0 0 8px config('colors.primary');
}

.btn-sm {
  @apply .h-btn-sm;
}

.btn-lg {
  @apply .h-12 leading-12 text-lg;
}

.btn-link {
  @apply .bg-transparent .px-0 .py-0 .shadow-none;
  text-shadow: none;
}

.btn-link:focus,
.btn-link:active {
  outline: inherit;
  box-shadow: none;
}

.btn-primary {
  @apply .bg-primary .text-white;
}

.btn-primary:not([disabled]):not(.btn-disabled):hover {
  @apply .bg-primary-dark;
}

.btn-danger {
  @apply .bg-danger .text-white;
}

.btn-outline {
  @apply border border-2 border-primary-30% rounded px-3 text-primary font-semibold;
}

.btn-outline:hover {
  @apply border-primary;
}

.btn-icon {
  @apply px-4 flex items-center;
}

.btn-white {
  @apply bg-white;
}

.btn-icon:hover {
  @apply .opacity-75;
}

.no-text-shadow {
  text-shadow: none;
}

/* Inline Links
---------------------------------------------------------------------------- */

.inline-link {
  @apply .text-primary .text-sm .font-bold .no-underline;
}

.inline-separator {
  @apply .text-80 .px-1;
}

/* Dropdown
---------------------------------------------------------------------------- */

.dropdown {
}

.dropdown-menu-left {
  top: 2.5rem;
  left: 0rem;
}

.dropdown-menu-right {
  top: 2.5rem;
  right: 0rem;
}

.dropdown-right {
  right: 20px;
}

.dropdown-alt .dropdown-trigger {
  @apply flex items-center h-9 px-3 bg-40 rounded;
}

.dropdown-trigger-active .dropdown-trigger {
  @apply bg-50;
}

/* Sidebar
---------------------------------------------------------------------------- */

.sidebar-link {
}

.router-link-active {
  @apply font-extrabold !important;
}

.sidebar-icon {
  @apply mr-3;
  width: 1.25rem;
  height: 1.25rem;
}

/* Fade Transition
---------------------------------------------------------------------------- */

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.15s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

/* Default Hover/Active
---------------------------------------------------------------------------- */

.default-hover:hover,
.default-hover:focus {
  opacity: 0.5;
}

.default-active:active {
  opacity: 0.8;
}

/* Dim links
---------------------------------------------------------------------------- */

.dim:hover,
.dim:active {
  opacity: 0.5;
}

.dim:active {
  opacity: 0.8;
}

/*.dim-child {
    &:hover .dim-target,
    &:focus .dim-target {
        opacity: 0.5;
    }

    &:active .dim-target {
        opacity: 0.8;
    }
}
*/

/* Reveal Helper
---------------------------------------------------------------------------- */

.reveal .reveal-target {
  opacity: 0;
}

.reveal:active .reveal-target,
.reveal:hover .reveal-target {
  opacity: 1;
}

/* MultiSelect Component
---------------------------------------------------------------------------- */
.select-box {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path fill="#35393C" fill-rule="nonzero" d="M8.293.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4A1 1 0 0 1 1.707.293L5 3.586 8.293.293z"/></svg>');
  background-size: 10px 6px;
  background-repeat: no-repeat;
  background-position: center right 0.75rem;
}

/* White Fade for excerpts
---------------------------------------------------------------------------- */
.white-fade {
  background: url('/img/white-fade.png');
}

/* Rotate
---------------------------------------------------------------------------- */
.rotate-180 {
  transform: rotate(180deg);
}

/* Remove the last border on a panel-item component
---------------------------------------------------------------------------- */
.remove-bottom-border {
  border-bottom: none;
}

/* Markdown Field
---------------------------------------------------------------------------- */
.remove-last-margin-bottom :last-child {
  margin-bottom: 0;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  font-weight: 600;
  color: var(--90);
  margin-bottom: 20px;
}

.markdown h1 {
  @apply text-2xl;
  color: var(--80);
}

.markdown h2 {
  @apply text-xl;
  font-weight: 400;
}

.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  @apply text-lg;
}

.markdown p {
  @apply text-base text-90 leading-normal mb-6;
}

.markdown blockquote {
  background-color: #f5f5f5;
  padding: 5px 15px;
  border-radius: 4px;
  margin-top: 10px;
  @apply .mb-4;
}

.markdown blockquote > p {
  @apply text-base;
  margin-top: 10px;
  @apply .mb-4;
}

.markdown blockquote p code {
  background-color: #e5e5e5;
}

.markdown ul,
.markdown ol {
  margin: 20px 0 20px;
}

.markdown ul {
  list-style: disc inside;
}

.markdown ol {
  list-style: decimal inside;
}

.markdown li {
  @apply text-base;
  line-height: 1.7;
  color: #666;
}

.markdown a {
  color: blue;
}

.markdown table {
  @apply w-full mb-6;
}

.markdown table thead {
}

.markdown table thead th {
  @apply text-left text-base border-b border-50 py-1;
}

.markdown table tbody {
}

.markdown table tbody td {
  @apply text-left text-base border-b border-50 py-2;
}

.markdown pre {
  margin-top: 20px;
  margin-bottom: 20px;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 4px;

  padding-top: 1rem;
  padding-bottom: 1rem;

  padding-left: 1rem;
  padding-right: 1rem;
}

.markdown pre > code {
  font-family: Menlo, monospace, fixed;
  font-size: 14px;
  background-color: transparent;
  color: #555;
  line-height: 1.5;
  word-break: normal;
  word-spacing: normal;
  white-space: pre;
  hyphens: none;
  direction: ltr;
  tab-size: 4;

  padding: 0 1rem;
}

.markdown code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.3rem 0.5rem;
  font-size: 14px;
  border-radius: 3px;
  font-family: Menlo, monospace, fixed;
}

/* Markdown Preview Field
---------------------------------------------------------------------------- */
.markdown-preview {
  @apply .font-mono .text-90 .text-sm !important;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  @apply .font-mono .text-sm !important .mb-3;
}

.markdown-preview p {
  @apply .mb-4 .leading-normal;
}

.markdown-preview blockquote {
  @apply .mb-4;
}

.markdown-preview blockquote > p {
  margin-top: 10px;
  @apply .mb-4;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 20px 0 20px;
}

.markdown-preview ul {
  list-style: disc inside;
}

.markdown-preview ol {
  list-style: decimal inside;
}

.markdown-preview pre {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Chartist
-----------------------------------------------------------------------------*/
.chartist-tooltip {
  min-width: 14em !important;
  padding: 0.2em !important;
  background: var(--white) !important;
  color: var(--primary) !important;
  @apply rounded border border-60 shadow font-sans !important;
}

.chartist-tooltip:before {
  display: none;
  border-top-color: var(--white) !important;
}

/* Vertical Center
-----------------------------------------------------------------------------*/
.vertical-center {
  position: absolute;
  top: 50%;
  transform: perspective(1px) translateY(-50%);
}

/* Override Form Field Widths For ConfirmActionModal
-----------------------------------------------------------------------------*/
.action .w-1\/5 {
  @apply .flex-no-shrink;
}

.action .w-1\/2 {
  @apply .w-full;
}

/* Override Form Field Widths For ConfirmActionModal
-----------------------------------------------------------------------------*/
.toasted-container.top-center {
  top: 30px !important;
}

.nova {
  @apply text-white py-2 rounded-lg shadow-lg;
}

.toasted.default {
  @apply bg-primary nova;
}

.toasted.success {
  @apply bg-success nova;
}

.toasted.error {
  @apply bg-danger nova;
}

.toasted.info {
  @apply bg-info nova;
}

.nova-action {
  @apply text-white .py-0;
}

.toasted .action {
  @apply nova-action !important;
}

/* Spin Animation
---------------------------------------------------------------------------- */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.spin {
  animation: spin 2s infinite linear;
  transform-origin: 50% 50%;
}

/* Error Pages
---------------------------------------------------------------------------- */
.text-error-title {
  font-size: 9rem;
}
.text-error-subtitle {
  font-size: 2.25rem;
}
.text-error-message {
  font-size: 1.25rem;
  color: #56677b;
}

.illustration {
  margin-right: 7.5rem;
}

/* Help Text
---------------------------------------------------------------------------- */
.help-text {
  @apply text-xs leading-normal text-80 italic;
}

.help-text a {
  @apply text-primary no-underline;
}

/* Charts
---------------------------------------------------------------------------- */
/* Partition Metric */
.ct-series-a .ct-area,
.ct-series-a .ct-slice-donut-solid,
.ct-series-a .ct-slice-pie {
  fill: #f5573b !important;
}
.ct-series-b .ct-area,
.ct-series-b .ct-slice-donut-solid,
.ct-series-b .ct-slice-pie {
  fill: #f99037 !important;
}
.ct-series-c .ct-area,
.ct-series-c .ct-slice-donut-solid,
.ct-series-c .ct-slice-pie {
  fill: #f2cb22 !important;
}
.ct-series-d .ct-area,
.ct-series-d .ct-slice-donut-solid,
.ct-series-d .ct-slice-pie {
  fill: #8fc15d !important;
}
.ct-series-e .ct-area,
.ct-series-e .ct-slice-donut-solid,
.ct-series-e .ct-slice-pie {
  fill: #098f56 !important;
}
.ct-series-f .ct-area,
.ct-series-f .ct-slice-donut-solid,
.ct-series-f .ct-slice-pie {
  fill: #47c1bf !important;
}
.ct-series-g .ct-area,
.ct-series-g .ct-slice-donut-solid,
.ct-series-g .ct-slice-pie {
  fill: #1693eb !important;
}
.ct-series-h .ct-area,
.ct-series-h .ct-slice-donut-solid,
.ct-series-h .ct-slice-pie {
  fill: #6474d7 !important;
}
.ct-series-i .ct-area,
.ct-series-i .ct-slice-donut-solid,
.ct-series-i .ct-slice-pie {
  fill: #9c6ade !important;
}
.ct-series-j .ct-area,
.ct-series-j .ct-slice-donut-solid,
.ct-series-j .ct-slice-pie {
  fill: #e471de !important;
}

/*Trend Metric*/
.full {
  top: 20%;
}

.half {
  top: 60%;
}

.ct-series-a .ct-bar,
.ct-series-a .ct-line,
.ct-series-a .ct-point {
  stroke: var(--primary-70) !important;
  stroke-width: 2px;
}

.ct-series-a .ct-area,
.ct-series-a .ct-slice-pie {
  fill: var(--primary-50) !important;
}

.ct-point {
  stroke: var(--primary) !important;
  stroke-width: 6px !important;
}

/* Tailwind Utilities
---------------------------------------------------------------------------- */
@tailwind utilities;
