@tailwind utilities;

.polylaitr-link {
  text-decoration: underline;
  cursor: pointer;
  opacity: 0;
}

tr:hover .polylaitr-link {
  opacity: 1;
}

#polylaitr-modal {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 10;
}

#polylaitr-modal .polylaitr-panel {
  position: absolute;
  left: 50%;
  top: 100px;
  background: #fff;
  border: 4px solid #f0f0f0;
  border-radius: 10px;
  width: 400px;
  margin-left: -200px;
  padding: 16px;
  box-shadow: #333 0 0 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #000;
}
#polylaitr-modal .polylaitr-panel.polylaitr-panel-wide {
  width: 600px;
  margin-left: -300px;
}
#polylaitr-modal .polylaitr-panel h2 {
  margin: 0;
}

.polylaitr-buttons {
  display: flex;
  justify-content: end;
  gap: 6px;
}

.polylaitr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  color: #666;
}

#polylaitr-langs .dashicons-yes {
  color: green;
}

#polylaitr-langs .dashicons-minus {
  color: #ccc;
}

#polylaitr-content {
  margin-top: 20px;
  font-size: 12px;
}
#polylaitr-content select {
  font-size: 12px;
}
.polylaitr-status-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.polylaitr-cell {
  display: flex;
  gap: 10px;
}

.polylaitr-progress {
  display: none;
  opacity: 0;
  animation: pulse 2s infinite;
}

.polylaitr-rotate {
  animation: rotate 2s infinite;
  animation-timing-function: linear;
}

@keyframes pulse {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.polylai-warn {
  background-color: #f3f4b2;
  border: 1px solid #ccc;
  padding: 10px;
  display: inline-block;
  margin-top: 10px;
}

.polylai-error {
  background-color: #f4b2b2;
  border: 1px solid #6a0808;
  padding: 10px;
  display: inline-block;
  margin-top: 10px;
}

.polylai-hidden {
  display: none !important;
}

.polylai-lang-badge {
  background-color: #71ef7c;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
}

.polylai-lang-badge.polylai-disabled {
  background-color: #ddd;
  color: #999;
}

.polylai-hover {
  display: none;
}

tr:hover .polylai-hover {
  display: inline-block;
}

.polylai-cron-activity {
  background-color: #71ef7c;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  display: inline-block;
}

.polylai-cron-activity.cron-error {
  background-color: #f4b2b2;
  border: 1px solid #6a0808;
}
.polylai-cron-panel {
  text-align: left;
  display: inline-block;
  font-family: 'Courier New', Courier, monospace;
  background-color: #fff495;
  padding: 10px;
}

.polylai-section-alerts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.polylai-section-alerts .polylai-alert-panel {
  background-color: #fbfaf2;
  border-left: 4px solid #fac500;
  padding: 20px 12px;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.05) 2px 4px 4px;
  margin-right: 20px;
  position: relative;
  padding-top: 20px;
}
.polylai-section-alerts .polylai-alert-panel.polylai-info {
  background-color: #d6ffef;
}
.polylai-admin-bar:before {
  content: '';
  width: 21px;
  height: 21px;
  background-image: url(../img/logo.png);
  background-size: contain;
  display: inline-block;
  position: relative;
  top: 5px;
}
.polylai-section-alerts .polylai-alert-panel.polylai-info:before {
}
.polylai-section-alerts .polylai-alert-panel h4 {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
  margin-bottom: 16px;
}
.polylai-section-alerts .polylai-alert-panel p {
  width: calc(100% - 80px);
}

.polylai-modal-bg {
  position: fixed;
  top: 0;
  left: 160px;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.polylai-modal-dialog {
  position: fixed;
  top: 50%;
  left: calc(50% + 80px);
  transform: translate(-50%, -50%);
  width: 760px;
  background-color: #fff;
  padding: 20px;
}
.polylai-modal-dialog h4 {
  font-size: 18px;
  font-weight: bold;
}
.polylai-modal-body {
  font-size: 14px;
}
.polylai-modal-body li span {
  font-size: 12px;
  position: relative;
  top: 3px;
}
.polylai-modal-header {
  position: relative;
}
.polylai-modal-footer {
  text-align: right;
  padding-top: 20px;
}
[data-polyalai-close] {
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: -10px;
}
.polylai-form h3:nth-of-type(3),
.polylai-form .form-table:nth-of-type(3) {
  display: none;
}
#polylai-modal-logs th {
  white-space: nowrap;
}
#polylai-modal-logs .polylai-modal-dialog {
  width: 60vw;
  min-width: 800px;
}
#polylai-modal-logs .polylai-modal-body {
  overflow-y: auto;
  max-height: 60vh;
}
.polylai-log-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  margin-right: 6px;
}
.polylai-log-badge.log-type-info {
  background-color: #d6ffef;
}
.polylai-log-badge.log-type-error {
  background-color: #f4b2b2;
}
.polylai-log-badge.log-type-debug {
  background-color: #fff495;
}
.polylai-log-badge.log-type-success {
  background-color: #71ef7c;
}

.polylai-svc {
  @apply tw-flex tw-flex-col tw-items-center tw-bg-slate-50;
  @apply tw-border-solid tw-p-2 tw-border-4 tw-cursor-pointer;
  @apply tw-border-slate-200 tw-rounded-md tw-transition-colors tw-duration-300;
  @apply tw-relative;
}
.polylai-svc-selected {
  @apply tw-border-green-500;
}
.polylang-alert-panels {
  display: flex;
  gap: 10px;
}

.polylai-activity-table td,
.polylai-activity-table th {
  @apply tw-px-4 tw-py-2;
}
.polylai-activity-table thead tr {
  @apply tw-bg-slate-300;
}
.polylai-activity-table td {
  border-bottom: 1px solid #e2e8f0;
}
.polylai-chip {
  @apply tw-text-slate-500 tw-text-[10px] tw-bg-slate-200 tw-p-1 tw-rounded-md tw-inline-block;
}