@tailwind base;
@tailwind components;
@tailwind utilities;

a {
  @apply hover:underline;
}

.btn-primary, .btn-secondary, .btn-danger, .btn-primary-fill {
  @apply rounded
}

.auth-layout input[type=text], .auth-layout input[type=password], .auth-layout input[type=email] {
  @apply w-full p-2 rounded bg-gray-200 border border-gray-400 text-lg px-2
}

input[type=text], input[type=password], input[type=email], input[type=date], select, textarea, .trix-content {
  @apply w-full p-1 rounded bg-gray-100 border border-gray-400 px-2
}

input[type=text]:disabled, input[type=password]:disabled, input[type=email]:disabled, select:disabled, textarea:disabled, .trix-content:disabled {
  @apply bg-gray-400 border-gray-400 font-semibold
}

input[type=submit] {
  @apply cursor-pointer
}

.checkbox-label {
  @apply flex items-center my-1
}

label {
  @apply text-gray-700
}

.form-error {
  @apply text-sm text-red-600 text-right
}

/* General */
.box {
  @apply rounded bg-white p-2 px-4 flex-1;
}
.box {
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25))
}
/* General END */

/* Sidebar */
.sidebar a {
  text-decoration: none !important;
}
.sidebar-item {
  @apply p-2 px-4 flex items-center hover:bg-[#151515] mb-2
}
.sidebar-item.active {
  @apply text-white bg-[#151515];
}

@media (max-width: 1024px) {
  .sidebar {
    @apply hidden
  }
  .sidebar.show {
    @apply block absolute inset-0 overflow-auto z-10 max-w-full
  }
}
/* Sidebar END */
input.apple-switch {
  position: relative;
  outline: none;
  cursor: pointer;
  width: 44px;
  height: 18px;
  background-color: #fff !important;
  border: 1px solid #C4C4C4;
  border-radius: 50px;
  box-shadow: inset -50px 0 0 0 #C4C4C4 !important;
}

input.apple-switch:after {
  content: "";
  position: absolute;
  top: -5px;
  left: -1px;
  background-color: #9B9B9B !important;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

input.apple-switch:checked:after {
  left: 16px;
  background-color: #9D004F !important;
  box-shadow: -2px 4px 3px rgba(0,0,0,0.05) !important;
}

input.apple-switch:focus, input.apple-switch *:focus {
  outline: none;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
}
.file-upload {
  display: block;
  border-radius: 5px;
  padding: 20px 5px;
  border: 2px dashed rgb(189, 189, 189);
  background-color: rgb(245, 245, 245);
}

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

.file-upload input[type=file] {
  display: none;
}
.modal {
  text-align: center;
  display: none;
}

.modal.modal-wide .modal-content {
  max-width: 82rem !important;
}

.modal.show {
  z-index: 10;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.show .backlayer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

.modal.show .modal-content {
  max-height: 100vh;
  overflow-y: auto;
  width: 100%;
  max-width: 42rem;
  min-height: 10rem;
  padding: 1rem;
  padding-top: 2rem;
  border-radius: 0.5rem;
  background: white;
  position: relative;
}

.modal .modal-content .modal-close {
  border-radius: 100%;
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal .modal-content .modal-close:hover {
  background: var(--primary-color);
  color: white;
}

@media (max-width: 767px) {
  .modal.show .modal-content { border-radius: 0; height: 100%; }
}
.trix-button--icon-decrease-nesting-level,
.trix-button--icon-increase-nesting-level,
.trix-button-group--file-tools,
.trix-button--icon-code {
  display: none !important;
}

.trix-content {
  min-height: 15rem;
}

.trix-content {
  @apply w-full;
}

.trix-content h1,
.trix-show h1 {
  font-size: 1.25rem !important;
  line-height: 1.25rem !important;
  @apply leading-5 font-semibold mb-4;
}

.trix-content a:not(.no-underline),
.trix-show a:not(.no-underline) {
  @apply underline;
}

.trix-content a:visited,
.trix-show a:visited {
  color: green;
} 

.trix-content ul,
.trix-show ul {
  list-style-type: disc;
  padding-left: 1rem;
}

.trix-content ol,
.trix-show ol {
  list-style-type: decimal;
  padding-left: 1rem;
}

.trix-content pre,
.trix-show pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 1.5em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}

.trix-content blockquote,
.trix-show blockquote {
  border: 0 solid #ccc;
  border-left-width: 0px;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

.trix-show-collapsed {
  max-height: 42px;
  overflow: hidden;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 :root {
  --dark-color: #2A2A2A;
  --primary-color: #9D004F;
  --secondary-color: #317D87;
}

html {
  background-color: var(--dark-color);
  font-family: 'Roboto', sans-serif !important;
}

.btn-primary {
  border: 2px solid var(--primary-color);
  font-weight: 500;
  color: var(--primary-color);
  transition: all .2s;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary-fill {
  border: 2px solid var(--primary-color);
  font-weight: 500;
  background-color: var(--primary-color);
  color: white;
  transition: all .2s;
}

.btn-secondary {
  font-weight: 500;
  color: white;
  background-color: var(--secondary-color);
}

.btn-danger {
  font-weight: 500;
  color: white;
  background-color: red;
}

button:disabled, .fancy-switch.disabled {
  opacity: 0.5;
  cursor: default;
}

.fancy-switch.centered .relative {
  left: 50%;
  transform: translateX(-50%);
}

input:focus {
  outline: 0;
}

.pill {
  border-radius: 9999px;
  background-color: #B4B4B4;
  padding: 0.25rem 1rem;
  color: black;
  white-space: nowrap;
}
.pill.pill-active {
  background-color: #9D004F;
  color: white;
}
@media (max-width: 1024px) {
  .pill { display: block; width: 100%; margin-bottom: 0.25rem; margin-left: 0; }
}

.document-container .document:last-child {
  border-bottom: 0 !important;
}

table th, table td { text-align: left; }
table th:last-child, table td:last-child { text-align: right; }
table td { padding: 1rem 0; border-bottom: 1px solid lightgray; }
table tbody tr:last-child td { border-bottom: 0; }
table tbody tr:nth-child(odd), .odd-colors:nth-child(odd) { background-color: #F2F4F5; }
table th { font-weight: 500; padding: 0.5rem 0; border-bottom: 2px solid gray; }
table tbody tr td:first-child, table thead tr th:first-child { padding-left: 0.5rem; }
table tbody tr td:last-child, table thead tr th:last-child { padding-right: 0.5rem; }

/* Theme helpers */
.bg-dark { background-color: var(--dark-color) }
.w-15 { width: 3.75rem; }
.text-primary { color: var(--primary-color) }
.whitespace-nowrap { white-space: nowrap; }
.border-primary { border-color: var(--primary-color) }
.box-shadow { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)) }
.no-underline { text-decoration: none !important; }
.hidden { display: none !important; }

/* Checkbox */
.form-checkbox {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  vertical-align: middle;
  background-origin: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  flex-shrink: 0;
  height: 1rem;
  width: 1rem;
  color: white;
  background-color: rgb(245 245 245) !important;
  border-color: rgb(189 189 189);
  border-width: 1px;
  border-radius: .25rem;
}

.form-checkbox:focus {
  outline: 0;
}

.form-checkbox:checked {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4a1 1 0 00-1.414-1.414L7 8.586 5.707 7.293z'/%3E%3C/svg%3E");
  border-color: transparent;
  background-color: #9D004F !important;
  background-size: 100% 100% !important;
  background-position: 50%;
  background-repeat: no-repeat;
}

.form-checkbox:disabled {
  opacity: 0.25;
}
/* Checkbox END */
