@import "../../../node_modules/react-grid-layout/css/styles.css";
@import "../../../node_modules/react-resizable/css/styles.css";
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");

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

/* DEFAULT STYLING */
:root {
  font-family: "Inter", "Helvetica Neue", sans-serif;
  --onvo-background-color: #f9fafb;
  --onvo-foreground-color: #ffffff;
  --onvo-font-color: #111;
  --onvo-font-override: inherit;
  --onvo-dark-background-color: #030712;
  --onvo-dark-foreground-color: #101827;
  --onvo-dark-font-color: #ddd;
  --onvo-dark-font-override: inherit;
}
textarea::-webkit-resizer {
  display: none;
}
.onvo-foreground-color {
  background-color: var(--onvo-foreground-color);
}
.onvo-background-color {
  background-color: var(--onvo-background-color);
}
.onvo-font-override {
  font-family: var(--onvo-font-override);
  color: var(--onvo-font-color) !important;
}

.onvo-dark .onvo-foreground-color {
  background-color: var(--onvo-dark-foreground-color);
}
.onvo-dark .onvo-background-color {
  background-color: var(--onvo-dark-background-color);
}
.onvo-dark .onvo-font-override {
  font-family: var(--onvo-font-override);
  color: var(--onvo-dark-font-color) !important;
}

/* TEXT WIDGET LINKS STYLING */
.onvo-text-widget a {
  text-decoration: underline;
  color: #3366cc;
}

/* REACT GRID STYLING */

.react-grid-item > .react-resizable-handle {
  background-image: none !important;
  width: 12px !important;
  height: 12px !important;
  border-bottom: 3px solid #00000030;
  border-right: 3px solid #00000030;
  border-bottom-right-radius: 8px;
  margin: 8px;
  opacity: 0;
  transition: all 0.15s ease-in-out;
  z-index: 10;
}
.onvo-dark .react-grid-item > .react-resizable-handle {
  border-bottom: 3px solid #ffffff30;
  border-right: 3px solid #ffffff30;
}
.react-grid-item:hover > .react-resizable-handle {
  opacity: 1;
}

.react-grid-item:hover {
  z-index: 20;
}
.react-resizable-handle::after {
  display: none !important;
}
.react-grid-placeholder {
  border-radius: 16px;
  background-color: #3366cc33 !important;
}

/* REACT DATA GRID STYLING */
.rdg-sort-arrow {
  margin-top: 12px;
}
.rdg a {
  text-decoration: none;
  color: #fff;
  background: #3b82f6;
  border-radius: 16px;
  padding: 4px 12px;
}
.rdg-cell[role="columnheader"] {
  overflow-y: visible;
}

.rdg {
  --rdg-background-color: var(--onvo-foreground-color) !important;
  --rdg-header-background-color: var(--onvo-background-color) !important;
  --rdg-row-hover-background-color: var(--onvo-background-color) !important;
  --rdg-color: var(--onvo-font-color);
  border-color: rgba(0, 0, 0, 0.1);
}

.onvo-dark .rdg {
  --rdg-background-color: var(--onvo-dark-foreground-color) !important;
  --rdg-header-background-color: var(--onvo-dark-background-color) !important;
  --rdg-row-hover-background-color: var(
    --onvo-dark-background-color
  ) !important;
  --rdg-color: var(--onvo-dark-font-color);
  border-color: rgba(255, 255, 255, 0.1);
}

.rsw-ce {
  flex: 1 0 auto;
  padding: 0.5rem;
}

.rsw-ce:focus {
  outline: 1px solid #668;
}

.rsw-ce[contentEditable="true"]:empty:not(:focus):before {
  color: grey;
  content: attr(placeholder);
  pointer-events: none;
}

.rsw-html {
  background: transparent;
  border: none;
  font-family: monospace, "Courier New";
}

.rsw-separator {
  align-self: stretch;
  border-right: 1px solid #ddd;
  display: flex;
  margin: 0 3px;
}

.rsw-dd {
  box-sizing: border-box;
  outline: none;
}

.rsw-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #222;
  font-size: 1em;
  height: 2em;
  outline: none;
  padding: 0;
  width: 2em;
}

.rsw-btn:hover {
  background: #eaeaea;
}

.rsw-btn[data-active="true"] {
  background: #e0e0e0;
}

.rsw-toolbar {
  align-items: center;
  border-bottom: 1px solid #ddd;
  display: flex;
  background-color: var(--onvo-foreground-color);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}
.rsw-editor {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.375rem;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  overflow: hidden;
  background-color: var(--onvo-background-color);
  margin-top: 4px;
}

/* RICH TEXT EDITOR STYLES */
.onvo-dark .rsw-editor {
  border-color: rgba(255, 255, 255, 0.1);
  background-color: var(--onvo-dark-background-color);
}

.onvo-dark .rsw-toolbar {
  background-color: var(--onvo-dark-foreground-color);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.onvo-dark .rsw-separator {
  border-right-color: var(--onvo-dark-background-color);
}
.onvo-dark .rsw-btn {
  color: #e2e8f0;
}

.onvo-dark .rsw-btn {
  color: #e2e8f0;
}
.onvo-dark .rsw-btn:hover {
  background: #334155;
}

.onvo-dark .rsw-btn[data-active="true"] {
  background: #334155;
}

/* ANIMATED GRADIENT BORDER STYLES */
.onvo-gradient-border {
  --borderWidth: 3px;
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  border-radius: 6px;
}
.onvo-gradient-border:after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--borderWidth));
  left: calc(-1 * var(--borderWidth));
  height: calc(100% + var(--borderWidth) * 2);
  width: calc(100% + var(--borderWidth) * 2);
  background: linear-gradient(60deg, #5073b8, #1098ad, #07b39b, #6fba82);
  border-radius: 9px;
  z-index: -1;
  animation: animatedgradient 3s ease alternate infinite;
  background-size: 300% 300%;
}

@keyframes animatedgradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.react-multi-email span[data-placeholder="true"] {
  top: 2px !important;
}
.react-multi-email [data-tag] [data-tag-item] {
  overflow-y: visible;
}

dialog {
  border: none;
}

/* resizeHandle={(axis: string) => {
  if (!editable) return <></>;
  if (axis === "se") {
    return (
      <div className="onvo-dashboard-grid-handle onvo-cursor-se-resize react-resizable-handle onvo-absolute onvo-bottom-2 onvo-right-2 onvo-rounded-br-lg onvo-border-solid onvo-border-b-[3px] onvo-border-r-[3px] " />
    );
  }
  return (
    <div className="onvo-dashboard-grid-handle onvo-cursor-sw-resize react-resizable-handle onvo-absolute onvo-bottom-2 onvo-left-2 onvo-rounded-bl-lg onvo-border-solid onvo-border-b-[3px] onvo-border-l-[3px] onvo-border-gray-300 dark:onvo-border-white/30" />
  );
}} */
