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

@layer components {
  .cp-shell {
    @apply min-h-screen bg-slate-100 text-slate-800;
  }

  .cp-container {
    @apply mx-auto w-full max-w-[100rem] px-4 sm:px-6 lg:px-8;
  }

  .cp-topbar {
    @apply border-b border-slate-200 bg-white/95 backdrop-blur;
  }

  .cp-shell-admin {
    @apply bg-slate-100;
  }

  .cp-topbar-admin {
    @apply border-slate-300 bg-gradient-to-r from-slate-100 to-slate-50;
  }

  .cp-main-admin {
    @apply border-l-4 border-slate-400 pl-4 md:pl-6;
  }

  .cp-brand-row {
    @apply flex flex-col gap-3 md:flex-row md:items-start md:justify-between;
  }

  .cp-topbar-right {
    @apply flex flex-col items-start gap-2 md:items-end;
  }

  .cp-brand-title {
    @apply text-2xl font-semibold tracking-tight text-slate-900;
  }

  .cp-brand-subtitle {
    @apply text-sm text-slate-500;
  }

  .cp-admin-badge {
    @apply ml-2 inline-flex items-center rounded-full border border-slate-400 bg-slate-200 px-2 py-0.5 text-[11px] font-semibold tracking-wide text-slate-700;
  }

  .cp-nav-card {
    @apply flex flex-wrap items-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-sm;
  }

  .cp-mode-switch {
    @apply inline-flex items-center gap-1 rounded-xl border border-slate-200 bg-white p-1 shadow-sm;
  }

  .cp-mode-link {
    @apply rounded-lg px-2.5 py-1 text-xs font-semibold tracking-wide text-slate-600 no-underline transition;
  }

  .cp-mode-link:hover {
    @apply bg-slate-100 text-slate-800;
  }

  .cp-mode-link.is-active {
    @apply bg-slate-700 text-white;
  }

  .cp-nav-link {
    @apply font-medium text-slate-700 transition hover:text-slate-900;
  }

  .cp-nav-pill {
    @apply ml-1 inline-flex min-w-5 items-center justify-center rounded-full bg-emerald-100 px-1.5 py-0.5 text-xs font-semibold text-emerald-700;
  }

  .cp-notification-link {
    @apply inline-flex items-center gap-1 rounded-lg border border-slate-300 bg-white px-2.5 py-1 text-sm font-medium text-slate-700 no-underline transition hover:bg-slate-50 hover:text-slate-900;
  }

  .cp-notification-badge {
    @apply inline-flex min-w-5 items-center justify-center rounded-full bg-rose-600 px-1.5 py-0.5 text-xs font-semibold text-white;
  }

  .cp-dev-context {
    @apply mt-3 inline-block rounded-lg border px-3 py-2 text-xs;
  }

  .cp-dev-context-south {
    @apply border-amber-200 bg-amber-50 text-amber-900;
  }

  .cp-dev-context-north {
    @apply border-sky-200 bg-sky-50 text-sky-900;
  }

  .cp-dev-context-main {
    @apply border-slate-200 bg-white text-slate-900;
  }

  .cp-flash {
    @apply mb-4 rounded-xl border px-4 py-3 text-sm shadow-sm;
  }

  .cp-flash-notice {
    @apply border-emerald-200 bg-emerald-50 text-emerald-900;
  }

  .cp-flash-alert {
    @apply border-rose-200 bg-rose-50 text-rose-900;
  }

  .cp-shell .wrapper.wrapper-content {
    @apply px-0 py-0;
  }

  .cp-shell .ibox {
    @apply overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm;
  }

  .cp-shell .ibox.float-e-margins {
    @apply mb-6;
  }

  .cp-shell .ibox-title {
    @apply border-b border-slate-200 bg-slate-50 px-5 py-4;
  }

  .cp-shell .ibox-title h5 {
    @apply m-0 text-base font-semibold tracking-tight text-slate-900;
  }

  .cp-shell .ibox-content {
    @apply bg-white p-5;
  }

  .cp-shell .table {
    @apply mb-0;
  }

  .cp-shell .table > thead > tr > th {
    @apply border-b border-slate-200 bg-slate-50 text-xs font-semibold uppercase tracking-wide text-slate-600;
  }

  .cp-shell .table > tbody > tr > td {
    @apply border-t border-slate-100 text-slate-700;
  }

  .cp-shell .table-striped > tbody > tr:nth-of-type(odd) {
    @apply bg-slate-50/40;
  }

  .cp-shell .form-control {
    @apply block w-full rounded-lg border-2 border-slate-400 bg-white text-slate-900 shadow-sm transition;
    min-height: 40px;
  }

  .cp-shell .form-group label {
    @apply mb-1 block text-sm font-semibold text-slate-700;
  }

  .cp-shell .form-control::placeholder {
    @apply text-slate-500;
  }

  .cp-shell .form-control:hover {
    @apply border-slate-500;
  }

  .cp-shell .form-control[readonly],
  .cp-shell .form-control[disabled] {
    @apply bg-slate-50 text-slate-500;
  }

  .cp-shell .form-control:focus {
    @apply border-sky-500 bg-white ring-2 ring-sky-200;
  }

  .cp-shell .cp-auth-form .form-control {
    max-width: 520px;
  }

  .cp-shell .btn {
    @apply rounded-lg border-slate-300 font-medium shadow-sm transition;
  }

  .cp-shell .btn-default,
  .cp-shell .btn.btn-default {
    @apply border-slate-300 bg-white text-slate-700 hover:bg-slate-50;
  }

  .cp-shell .btn-primary,
  .cp-shell .btn.btn-primary {
    @apply border-emerald-600 bg-emerald-600 text-white hover:border-emerald-700 hover:bg-emerald-700;
  }

  .cp-shell .btn-warning,
  .cp-shell .btn.btn-warning {
    @apply border-amber-500 bg-amber-500 text-white hover:border-amber-600 hover:bg-amber-600;
  }

  .cp-shell .btn-danger,
  .cp-shell .btn.btn-danger {
    @apply border-rose-600 bg-rose-600 text-white hover:border-rose-700 hover:bg-rose-700;
  }

  .cp-shell .cp-chip-btn {
    @apply rounded-full border-emerald-300 bg-emerald-50 text-emerald-800 hover:border-emerald-400 hover:bg-emerald-100;
  }

  .cp-shell .cp-chip-btn-alt {
    @apply rounded-full border-sky-300 bg-sky-50 text-sky-800 hover:border-sky-400 hover:bg-sky-100;
  }

  .cp-shell .label {
    @apply rounded-full px-2.5 py-1 text-[11px] font-semibold tracking-wide;
  }

  .cp-shell hr {
    @apply my-5 border-slate-200;
  }
}
/*

 */

/*
  Upload Inspinia CSS files to:
  vendor/assets/stylesheets/inspinia/

  Then add sprockets directives at the top of this file, e.g.:
  require inspinia/bootstrap.min
  require inspinia/style
*/
/*
 * 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.
 *


 */

.domain-context-debug {
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 12px;
	line-height: 1.4;
	background: var(--domain-surface);
	border-left: 4px solid var(--domain-accent);
	border-radius: var(--domain-radius);
}

a:not(.btn):not([class*="btn-"]):not(.cp-mode-link):not(.cp-nav-link):not(#app a) {
	color: #1d4ed8;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:not(.btn):not([class*="btn-"]):not(.cp-mode-link):not(.cp-nav-link):not(#app a):hover,
a:not(.btn):not([class*="btn-"]):not(.cp-mode-link):not(.cp-nav-link):not(#app a):focus {
	color: #0f766e;
	text-decoration-thickness: 2px;
}

a:not(.btn):not([class*="btn-"]):not(.cp-mode-link):not(.cp-nav-link):not(#app a):focus-visible {
	outline: 2px solid #0f766e;
	outline-offset: 2px;
	border-radius: 2px;
}

.domain-addons-list {
	margin-top: 12px;
	margin-left: 12px;
	color: #676a6c;
}

.domain-theme-preview {
	--preview-primary: #1f4e79;
	--preview-accent: #1ab394;
	--preview-surface: #f8f9fb;
	--preview-radius: 8px;
	margin-bottom: 16px;
	padding: 12px;
	background: var(--preview-surface);
	border: 1px solid #d8dce2;
	border-radius: var(--preview-radius);
}

.domain-theme-preview__title {
	font-weight: 600;
	color: var(--preview-primary);
	margin-bottom: 8px;
}

.domain-theme-preview__badge {
	display: inline-block;
	padding: 2px 8px;
	background: var(--preview-accent);
	color: #fff;
	border-radius: 999px;
	font-size: 12px;
	margin-left: 8px;
}

.domain-theme-preview__line {
	margin-top: 8px;
	padding: 8px;
	border-left: 4px solid var(--preview-accent);
	border-radius: var(--preview-radius);
	background: #fff;
}

.domain-theme-presets {
	margin: 0 0 14px;
}

.domain-theme-presets__label {
	display: inline-block;
	margin-right: 8px;
	font-weight: 600;
}

.domain-theme-presets .btn {
	margin-right: 6px;
}

.cart-table > tbody > tr > td,
.cart-table > thead > tr > th {
	vertical-align: top;
}

.cp-order-block .cart-table {
	width: 100%;
	margin-top: 10px;
	margin-bottom: 0;
}

.cart-price-header,
.cart-price-cell,
.cart-grand-total {
	text-align: right;
}

.price-cell {
	text-align: right;
	max-width: 90px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cp-table-number {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.cp-order-nav-link {
	background: #f8fafc !important;
	border: 1px solid #cbd5e1 !important;
	color: #334155 !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
}

.cp-order-nav-link:hover,
.cp-order-nav-link:focus {
	background: #f1f5f9 !important;
	border-color: #94a3b8 !important;
	color: #0f172a !important;
}

.cp-chip-btn {
	background: #ecfdf5 !important;
	border: 1px solid #86efac !important;
	color: #166534 !important;
	border-radius: 9999px !important;
	font-weight: 700 !important;
	padding: 2px 9px !important;
	text-decoration: none !important;
}

.cp-chip-btn:hover,
.cp-chip-btn:focus {
	background: #dcfce7 !important;
	border-color: #4ade80 !important;
	color: #14532d !important;
}

.cp-chip-btn-alt {
	background: #eff6ff !important;
	border: 1px solid #93c5fd !important;
	color: #1e3a8a !important;
	border-radius: 9999px !important;
	font-weight: 700 !important;
	padding: 2px 9px !important;
	text-decoration: none !important;
}

.cp-chip-btn-alt:hover,
.cp-chip-btn-alt:focus {
	background: #dbeafe !important;
	border-color: #60a5fa !important;
	color: #1e40af !important;
}

.cp-order-block {
	margin-top: 10px;
	margin-bottom: 12px;
	padding: 12px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
}

.cp-order-block-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.cp-order-block-title {
	margin: 0 !important;
	font-weight: 700;
}

.cp-order-block-project {
	background: #f0fdf4;
	border-left: 4px solid #22c55e;
}

.cp-order-block-project .cp-order-block-title {
	color: #166534;
}

.cp-order-block-product {
	background: #eff6ff;
	border-left: 4px solid #3b82f6;
}

.cp-order-block-product .cp-order-block-title {
	color: #1e3a8a;
}

.cp-order-summary {
	padding: 10px 12px;
	margin-bottom: 10px;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
}

.cp-order-total {
	color: #0f766e;
	font-weight: 700;
}

.cp-status-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.cp-status-badge-active {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.cp-status-badge-default {
	background: #e2e8f0;
	color: #334155;
	border: 1px solid #cbd5e1;
}

.cp-status-badge-warning {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
}

.cp-status-badge-priced {
	background: #dbeafe;
	color: #1e3a8a;
	border: 1px solid #93c5fd;
}

.cp-privileged-pricing-badge {
	display: inline-block;
	padding: 6px 10px;
	border-radius: 8px;
	border: 1px solid #f59e0b;
	background: #fef3c7;
	color: #92400e;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.01em;
	box-shadow: 0 1px 2px rgba(146, 64, 14, 0.15);
}

.cp-order-table-full {
	width: 100% !important;
	table-layout: auto;
}
