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

@layer base {
  dialog::backdrop {
    @apply bg-gray-800 bg-opacity-75 transition-opacity;
  }

  .editor-content a {
    @apply text-grape-700 underline;
  }

  .editor-content table {
    @apply min-w-full divide-y divide-gray-300;
  }

  .editor-content table thead {
    @apply bg-gray-50;
  }

  .editor-content table tbody {
    @apply divide-y divide-gray-200 bg-white;
  }

  .editor-content table th {
    @apply px-3 py-3.5;
  }

  .editor-content table td {
    @apply py-4 pl-4;
  }

  .editor-content h1 {
    font-size: 2.8rem;
    font-weight: 500;
  }

  .editor-content h2 {
    font-size: 2.5rem;
    font-weight: 500;
  }

  .editor-content h3 {
    font-size: 2.25rem;
    font-weight: 500;
  }

  .editor-content h4 {
    font-size: 1.8rem;
    font-weight: 500;
  }

  .editor-content p {
    padding-bottom: 1rem;
  }

  .editor-content strong {
    @apply font-bold;
  }

  .editor-content ul,
  .editor-content ol {
    list-style-position: outside;
    margin-left: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .editor-content ul {
    font-family: var(--paragraph-font);
    list-style-type: disc;
  }

  .editor-content ol {
    list-style-type: decimal;
  }

  .editor-content hr {
    margin-bottom: 1rem;
  }

  ul {
    list-style-position: outside;
  }
}

@layer components {
  /* Buttons */
  .button {
    @apply rounded-md border border-transparent px-4 py-2 text-sm font-medium focus:outline-none sm:w-auto;
    @apply disabled:cursor-not-allowed;
  }

  button .state-active {
    @apply inline-flex items-center;
  }

  button .state-disabled {
    @apply hidden;
  }

  button[disabled] .state-active {
    @apply hidden;
  }

  button[disabled] .state-disabled {
    @apply inline-flex items-center;
  }

  .button--primary {
    @apply button bg-grape-700 text-white shadow-sm hover:bg-grape-800;
  }

  .admin .button--primary {
    @apply button bg-orange-500 text-white shadow-sm hover:bg-orange-700;
  }

  .admin .button--secondary {
    @apply button bg-emerald-500 text-white shadow-sm hover:bg-emerald-700;
  }

  .button-outline--primary {
    @apply button border-2 border-grape-700 bg-transparent text-grape-700 shadow-sm hover:bg-grape-50;
  }

  .admin .button-outline--primary {
    @apply button border-2 border-orange-500 bg-transparent text-orange-500 shadow-sm hover:bg-orange-50;
  }

  .button--danger {
    @apply button bg-red-600 text-white shadow-sm hover:bg-red-700;
  }

  /* Tabs */
  .tab {
    @apply border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300;
  }

  .tab--active {
    @apply border-grape-700 text-grape-700;
  }

  /* Sortable */
  .sortable--item {
    @apply bg-white;
  }

  .sortable--ghost .sortable--item {
    @apply bg-gray-100;
  }

  /* Main Navbar */
  .manage .navbar-item {
    @apply text-grape-400 text-sm hover:text-white;
  }

  .navbar-item--selected {
    @apply text-white !important;
  }

  .marketing .navbar-item {
    @apply block py-3 sm:px-1 sm:py-1 text-base text-gray-900;
    @apply sm:border-transparent sm:border-b-2 sm:hover:border-grape-700 sm:hover:text-grape-700;
    @apply hover:bg-gray-50 sm:hover:bg-transparent;
  }

  .marketing .navbar-item--selected {
    @apply text-grape-700 border-grape-700 !important;
  }

  .admin .navbar-item {
    @apply text-orange-300 text-sm hover:text-white;
  }

  /* Settings Sidebar */
  .sidebar-item--selected {
    @apply bg-gray-50 text-grape-700 !important;
  }

  .admin .sidebar-item--selected {
    @apply bg-gray-50 text-orange-700 !important;
  }

  /* TinyMCE */
  .tox-tinymce {
    @apply border ring-2 ring-transparent border-gray-300 shadow-sm !important;
  }

  .tox-tinymce-focused {
    @apply ring-2 ring-grape-100 border border-grape-400 !important;
  }

  .admin .tox-tinymce-focused {
    @apply ring-2 ring-orange-100 border border-orange-400 !important;
  }

  .tox-tinymce-focused.tox-tinymce-invalid {
    @apply ring-2 ring-red-100 border border-red-400 !important;
  }

  .tox-tinymce-invalid {
    @apply border border-red-400 !important;
  }

  .tox:not(.tox-tinymce-inline).tox-tinymce--toolbar-bottom .tox-editor-header {
    @apply border-t border-gray-300 !important;
  }

  /* Portfolio Theme */

  .theme .content--container h2 + p {
    @apply pt-2;
  }

  .theme .content--container p {
    @apply pb-6;
  }

  .theme .content--container ul {
    @apply list-disc ml-6 mb-6;
  }

  .theme .content--container li {
    @apply pb-2;
  }

  .theme .content--container hr {
    border: none;
    background-image: none;
    margin: 0 0 2rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  }

  .theme .content--container img {
    @apply inline-block rounded-lg shadow-md;
  }

  .theme .content--container img:before {
    @apply mt-12;
  }

  /* Portfolio - Theme One */
  .theme-default .content--container h1 {
    @apply text-[35px] font-bold pb-3 leading-[2.45rem];
  }

  .theme-default .content--container h2 {
    @apply text-[20px] font-bold pb-3 leading-[2.45rem];
  }

  /* Blog posts content */
  .marketing .post--content {
    @apply prose prose-lg block;
    @apply text-gray-500 !important;
  }

  .marketing .post--content tbody td {
    vertical-align: inherit !important;
  }

  .marketing .post--content blockquote {
    @apply border-l-grape-700 text-gray-400 font-normal text-lg;
  }

  .marketing .post--content a {
  @apply text-grape-700 hover:text-grape-800;
  }

  /* Help article content */
  .manage .guide--content {
    @apply prose prose-lg block;
    @apply text-gray-500 !important;
  }

  .manage .guide--content tbody td {
    vertical-align: inherit !important;
  }

  .manage .guide--content blockquote {
    @apply border-l-grape-700 text-gray-400 font-normal text-lg;
  }

  .manage .guide--content a {
    @apply text-grape-700 hover:text-grape-800;
  }

  /* Inline file upload */
  .inline-file-upload ::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit;
  }

  .inline-file-upload input[type=file] {
    overflow: hidden
  }

  .inline-file-upload input[type=file]:not(:disabled):not([readonly]) {
    cursor: pointer
  }

  .inline-file-upload input::file-selector-button,
  .inline-file-upload input::-webkit-file-upload-button {
    padding: .75rem 1.5rem;
    margin: -.375rem -.75rem;
    margin-inline-end: .75rem;
    color: #ffffff;
    background-color: #373A3E;
    pointer-events: none;
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    border-inline-end-width: 1px;
    border-radius: 0;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
  }

  .inline-file-upload input:hover:not(:disabled):not([readonly])::file-selector-button,
  .inline-file-upload input:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
    background-color: #373A3E;
  }

  .attachments-item a {
    @apply text-grape-700 hover:underline;
  }

  .admin .attachments-item a {
    @apply text-orange-500 hover:underline;
  }

  .ticket-content a {
    @apply underline;
  }

  /* Pagination */
  .pagination-panel {
    @apply flex justify-center border-t border-gray-200 bg-white py-4;
  }

  .pagination-panel .page.active {
    @apply relative inline-flex items-center border px-4 py-2 text-sm font-medium rounded;
  }

  .manage .pagination-panel .page.active {
    @apply border-grape-600 bg-grape-50 text-grape-600;
  }

  .admin .pagination-panel .page.active {
    @apply border-orange-600 bg-orange-50 text-orange-600;
  }

  .theme .pagination-panel {
    background-color: var(--text-background-color);
    border-color: var(--header-text-color);
  }

  .theme .pagination-panel .page.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
  }

  .pagination-panel .page a {
    @apply border-gray-300 bg-white text-gray-500 hover:bg-gray-50;
    @apply relative inline-flex items-center border px-4 py-2 text-sm font-medium rounded;
  }

  .pagination-panel .page.gap {
    @apply border-transparent bg-white text-gray-700;
    @apply relative inline-flex items-center border px-4 py-2 text-sm font-medium;
  }

  .pagination-panel .page.disabled {
    @apply hidden;
  }
}
body.theme {
  background-color: var(--background-color);
  color: var(--text-color);
}

/* Navigation */

.theme .nav-item {
  font-family: var(--header-font);
  color: var(--menu-text-color);
}

.theme .nav-item:hover {
  color: var(--menu-active-text-color);
}

.theme .nav-item--active {
  color: var(--menu-active-text-color);
}

/* Content */

.theme .content {
  padding: 2rem;
  line-height: 1.6;
}

.theme .content h1 {
  font-size: 2.8rem;
  font-weight: 500;
}

.theme .content h2 {
  font-size: 2.5rem;
  font-weight: 500;
}

.theme .content h3 {
  font-size: 2.25rem;
  font-weight: 500;
}

.theme .content h4 {
  font-size: 1.8rem;
  font-weight: 500;
}

.theme .content a {
  color: var(--link-color);
  text-decoration: underline;
}

.theme .content p {
  padding-bottom: 1rem;
}

.theme .content p:last-child {
  padding-bottom: 0;
}

.theme .content ul,
.theme .content ol {
  list-style-position: outside;
  margin-left: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.theme .content ul {
  font-family: var(--paragraph-font);
  list-style-type: disc;
}

.theme .content ol {
  list-style-type: decimal;
}

.theme .content hr {
  margin-bottom: 1rem;
}

/* Forms */
.theme .button--primary {
  background-color: var(--link-color);
  color: var(--text-color);
  padding: 1rem 2rem;
}

.theme .button--primary:hover {
  background-color: var(--link-color-1);
}

.theme .field:focus {
  border-color: var(--background-color-2);
  box-shadow: white 0px 0px 0px 0px, var(--background-color) 0px 0px 0px 2px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
}

/* Writing Sample */
.theme .writing-sample-preview a,
.theme .writing-sample a.no-underline {
  text-decoration: none;
}

.theme .writing-sample-preview h3,
.theme .post-preview h3 {
  /* font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; */
  font-family: var(--header-font);
  font-size: 1.35rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
}

.theme .writing-sample h2 {
  /* font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; */
  font-family: var(--header-font);
  font-weight: 600;
  font-size: 1.85rem;
}

.theme .writing-sample img {
  margin-bottom: 1rem;
}
/* .theme-one {
  --header-font: "Satisfy", cursive;
  --serif-font: "Source Serif Pro", serif;
  --sans-serif-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
} */

.theme.theme-one header h1 {
  font-family: var(--header-font);
}

.theme-one {
  font-size: 1.2rem;
  /* font-family: var(--serif-font); */
  font-family: var(--paragraph-font);
}

.theme-one nav {
  /* font-family: var(--sans-serif-font); */
  font-family: var(--paragraph-font);
}

.font-serif {
  /* font-family: var(--sans-serif-font); */
  font-family: var(--paragraph-font);
}

.theme.theme-one .writing-sample-preview .excerpt,
.theme.theme-one .post-preview .excerpt {
  /* font-family: var(--serif-font); */
  font-family: var(--paragraph-font);
}

.theme-one .resume ul {
  list-style-type: disc;
  padding-left: 2rem;
  margin: 1rem 0;
}

.theme-one .resume li,
.theme-one .resume p {
  padding-bottom: 0.5rem;
}
body.theme.theme-three {
  background-color: var(--text-background-color);
}

.theme.theme-three header h1 {
  /* font-family: 'Work Sans', sans-serif; */
  font-family: var(--header-font);
}
.theme-two .content h2 {
  line-height: 1;
}

.theme-two .content h3 {
  font-size: 1.6rem !important;
}

.theme-two h2 {
  font-family: var(--header-font);
}

.theme-two .content h2 + p {
  padding-top: 1rem;
}
/*
 * 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.
 *


 */
