// Global iView (view-design) skin override — AutoShopee Kit brand palette
// Reference: docs/core/DESIGN.md. Chain .ivu-* selectors for specificity, never !important.

@import './tokens.scss';

.ivu-btn {
  border-radius: $radius-item;
  transition: background-color $motion-fast, border-color $motion-fast, color $motion-fast,
    box-shadow $motion-fast;
}

.ivu-btn-primary {
  background-color: $c-brand;
  border-color: $c-brand;
}

.ivu-btn-primary:hover,
.ivu-btn-primary:focus {
  background-color: $c-brand-hover;
  border-color: $c-brand-hover;
  box-shadow: none;
}

.ivu-btn-primary:active,
.ivu-btn-primary.active {
  background-color: $c-brand-active;
  border-color: $c-brand-active;
}

.ivu-btn-ghost.ivu-btn-primary {
  color: $c-brand;
  background-color: transparent;
  border-color: $c-brand;
}

.ivu-btn-ghost.ivu-btn-primary:hover,
.ivu-btn-ghost.ivu-btn-primary:focus {
  color: $c-brand-hover;
  background-color: $c-brand-tint;
  border-color: $c-brand-hover;
}

.ivu-btn-ghost.ivu-btn-error {
  color: $c-error;
  background-color: transparent;
  border-color: $c-error;
}

.ivu-btn-ghost.ivu-btn-error:hover,
.ivu-btn-ghost.ivu-btn-error:focus {
  color: $c-error;
  background-color: $c-error-bg;
  border-color: $c-error;
}

.ivu-btn-ghost.ivu-btn-success {
  color: $c-success;
  background-color: transparent;
  border-color: $c-success;
}

.ivu-btn-ghost.ivu-btn-warning {
  color: $c-warning;
  background-color: transparent;
  border-color: $c-warning;
}

.ivu-btn-ghost[disabled],
.ivu-btn-ghost[disabled]:hover {
  color: $c-text-placeholder;
  background-color: transparent;
  border-color: $c-border-input;
}

.ivu-btn-default {
  color: $c-text;
  border-color: $c-border-input;
}

.ivu-btn-default:hover,
.ivu-btn-default:focus {
  color: $c-brand;
  border-color: $c-brand;
  background-color: $c-brand-tint;
}

.ivu-btn-text {
  color: $c-link;
}

.ivu-btn-text:hover,
.ivu-btn-text:focus {
  color: $c-link-hover;
  background-color: $c-surface-alt;
}

.ivu-btn-error {
  background-color: $c-error;
  border-color: $c-error;
}

.ivu-btn-success {
  background-color: $c-success;
  border-color: $c-success;
}

.ivu-btn-warning {
  background-color: $c-warning;
  border-color: $c-warning;
}

.ivu-btn-ghost.ivu-btn-dashed,
.ivu-btn-dashed {
  border-color: $c-border-input;
  color: $c-text;
}

.ivu-input,
.ivu-input-number,
.ivu-select-selection,
.ivu-cascader-input {
  border-radius: $radius-item;
  border-color: $c-border-input;
  color: $c-text-strong;
  transition: border-color $motion-fast, box-shadow $motion-fast;
}

.ivu-input::placeholder,
.ivu-select-placeholder {
  color: $c-text-placeholder;
}

.ivu-input:hover,
.ivu-input-number:hover,
.ivu-select-selection:hover {
  border-color: $c-brand-hover;
}

.ivu-input:focus,
.ivu-input-focused .ivu-input,
.ivu-input-number-focused,
.ivu-select-visible .ivu-select-selection {
  border-color: $c-brand;
  box-shadow: 0 0 0 2px rgba(238, 77, 45, 0.14);
}

.ivu-select-item-selected,
.ivu-select-item-selected:hover,
.ivu-select-item-focus {
  color: $c-brand;
  background: $c-brand-tint;
}

.ivu-select-dropdown {
  border-radius: $radius-item;
  box-shadow: $shadow-card;
}

.ivu-modal-content {
  border-radius: $radius-card;
  box-shadow: $shadow-card-lg;
  overflow: hidden;
}

.ivu-modal-header {
  border-bottom: 1px solid $c-border;
  padding: 14px 16px;
}

.ivu-modal-header p,
.ivu-modal-header-inner {
  color: $c-text-strong;
  font-size: 15px;
  font-weight: 600;
}

.ivu-modal-body {
  padding: 16px;
  color: $c-text;
}

.ivu-modal-footer {
  border-top: 1px solid $c-border;
  padding: 12px 16px;
}

.ivu-card {
  border-radius: $radius-card;
  border-color: $c-border;
}

.ivu-card-head {
  border-bottom: 1px solid $c-border;
  padding: 12px 16px;
}

.ivu-card-head p,
.ivu-card-head-inner {
  color: $c-text-strong;
  font-weight: 600;
}

.ivu-table th {
  background: $c-surface-soft;
  color: $c-text-muted;
  font-weight: 600;
  font-size: 13px;
}

.ivu-table td,
.ivu-table th {
  border-bottom: 1px solid $c-border;
}

.ivu-table:before,
.ivu-table:after {
  background-color: transparent;
}

.ivu-table-row:hover td,
.ivu-table-stripe .ivu-table-body tr.ivu-table-row-hover td {
  background: $c-surface-alt;
}

.ivu-table-wrapper {
  border-radius: $radius-item;
  border-color: $c-border;
}

.ivu-tag {
  border-radius: $radius-badge;
  font-weight: 500;
}

.ivu-tabs-bar {
  border-bottom-color: $c-border;
}

.ivu-tabs-nav .ivu-tabs-tab:hover {
  color: $c-brand-hover;
}

.ivu-tabs-nav .ivu-tabs-tab-active {
  color: $c-brand;
}

.ivu-tabs-ink-bar {
  background-color: $c-brand;
}

.ivu-page-item:hover,
.ivu-page-item:hover a {
  border-color: $c-brand;
  color: $c-brand;
}

.ivu-page-item-active,
.ivu-page-item-active:hover {
  border-color: $c-brand;
}

.ivu-page-item-active a,
.ivu-page-item-active:hover a {
  color: $c-brand;
}

.ivu-radio-group-button .ivu-radio-wrapper-checked {
  color: $c-brand;
  border-color: $c-brand;
  box-shadow: -1px 0 0 0 $c-brand;
}

.ivu-radio-group-button .ivu-radio-wrapper:hover {
  color: $c-brand-hover;
}

.ivu-radio-checked .ivu-radio-inner,
.ivu-checkbox-checked .ivu-checkbox-inner {
  border-color: $c-brand;
  background-color: $c-brand;
}

.ivu-switch-checked {
  border-color: $c-brand;
  background-color: $c-brand;
}

.ivu-spin {
  color: $c-brand;
}

.ivu-spin-dot {
  background-color: $c-brand;
}

.ivu-message-notice-content {
  border-radius: $radius-item;
  box-shadow: $shadow-card;
}

.ivu-poptip-inner,
.ivu-tooltip-inner {
  border-radius: $radius-item;
}

.ivu-poptip-inner {
  box-shadow: $shadow-card;
}

.ivu-progress-bg {
  background-color: $c-brand;
}

.ivu-alert {
  border-radius: $radius-item;
}
