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

@layer base {
  * {
    @apply transition-colors duration-100;
  }

  body {
    @apply bg-white dark:bg-dark-bg-primary text-primary-text dark:text-dark-text-primary;
  }

  /* Style all inputs and buttons for dark mode */
  input:not(.ant-input):not(.agui-item):not(.agui-item *),
  textarea:not(.ant-input):not(.agui-item):not(.agui-item *),
  select:not(.ant-select):not(.agui-item):not(.agui-item *) {
    @apply bg-white dark:bg-dark-bg-secondary border-gray-300 dark:border-dark-border;
  }

  button:not(.ant-btn):not(.agui-item):not(.agui-item *) {
    @apply bg-white dark:bg-dark-bg-secondary text-primary-text dark:text-dark-text-primary 
           hover:bg-gray-100 dark:hover:bg-dark-hover;
  }
}

/* Ant Design Dark Mode Overrides */
.dark {
  /* Table styles */
  .ant-table {
    @apply bg-dark-bg-secondary;
  }

  /* Input styles */
  .ant-input,
  .ant-input-affix-wrapper {
    @apply bg-dark-bg-secondary border-dark-border;
  }

  /* Select styles */
  .ant-select:not(.ant-select-customize-input) .ant-select-selector {
    @apply bg-dark-bg-secondary border-dark-border;
  }

  /* Button styles */
  .ant-btn:not(.ant-btn-primary) {
    @apply bg-dark-bg-secondary border-dark-border;
  }

  /* Modal styles */
  .ant-modal-content,
  .ant-modal-header {
    @apply bg-dark-bg-secondary;
  }

  /* Dropdown styles */
  .ant-dropdown-menu {
    @apply bg-dark-bg-secondary;
  }

  /* Card styles */
  .ant-card {
    @apply bg-dark-bg-secondary;
  }

  /* Navbar styles */
  nav {
    @apply border-dark-border;

    a {
      @apply text-dark-text-primary hover:text-dark-text-primary;
    }
  }

  /* Tab styles */
  .tab-container {
    @apply bg-dark-bg-primary border-dark-border;

    .tab {
      @apply text-dark-text-primary border-dark-border;

      &:hover {
        @apply bg-dark-hover;
      }

      &.selected {
        @apply bg-dark-hover border-blue-500;
      }
    }
  }

  .ant-tabs-top > .ant-tabs-nav::before {
    @apply border-b-gray-600;
  }

  .ant-tabs-tab-active span {
    @apply text-gray-100 border-b-gray-100;
  }
  .ant-tabs-ink-bar {
    @apply !bg-gray-100;
  }
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  color: rgb(var(--foreground-rgb));
  background: linear-gradient(
      to bottom,
      transparent,
      rgb(var(--background-end-rgb))
    )
    rgb(var(--background-start-rgb));
}

a {
  color: inherit;
  text-decoration: none;
}

@media (prefers-color-scheme: light) {
  html {
    color-scheme: light;
  }
}

.oracle-report-ctr pre code {
  color: theme("colors.gray.200");
  text-shadow: none;
}

.oracle-report-ctr li br {
  display: none;
}

.oracle-report-ctr li p {
  margin: 0;
}

.ant-drawer .ant-drawer-body {
  padding: 0;
}

.oracle-report-comment {
  @apply bg-amber-100 underline underline-offset-4 decoration-4 decoration-amber-400 cursor-pointer dark:bg-amber-800 text-gray-700 dark:text-white dark:underline dark:decoration-4 dark:decoration-amber-400;
}

.revise-modal-comment-container {
  @apply text-sm m-2 rounded-md border dark:border-gray-600 text-gray-600 dark:text-gray-200 overflow-hidden;
}

.revise-modal-highlight {
  @apply p-2 py-4 border-b dark:border-gray-600;
}

.revise-modal-comment-text {
  @apply p-2;
}

.revise-modal-header {
  @apply px-2 p-2 text-xs text-gray-400 bg-gray-50 dark:bg-gray-700;
}