/* Paisley Partners brand overrides for Bootstrap */

:root {
  --pp-grey: #5b6770;
  --pp-grey-dark: #4a555d;
  --pp-grey-light: #6d7880;
  --pp-green: #a5ce4d;
  --pp-green-dark: #8fb83e;
  --pp-green-light: #b8da6f;
  --pp-white: #ffffff;
  --pp-light-gray: #f8f9fa;
  --pp-gray: #6c757d;
  --pp-success: #28a745;
  --pp-warning: #ffc107;
  --pp-danger: #dc3545;
  --bs-primary: #5b6770;
  --bs-primary-rgb: 91, 103, 112;
  --bs-link-color: #5b6770;
  --bs-link-hover-color: #4a555d;
}

.btn-primary {
  --bs-btn-bg: #a5ce4d;
  --bs-btn-border-color: #a5ce4d;
  --bs-btn-color: #2d2d2d;
  --bs-btn-hover-bg: #8fb83e;
  --bs-btn-hover-border-color: #8fb83e;
  --bs-btn-hover-color: #2d2d2d;
  --bs-btn-active-bg: #8fb83e;
  --bs-btn-active-border-color: #8fb83e;
  --bs-btn-active-color: #2d2d2d;
  --bs-btn-focus-shadow-rgb: 165, 206, 77;
  --bs-btn-disabled-bg: #a5ce4d;
  --bs-btn-disabled-border-color: #a5ce4d;
  --bs-btn-disabled-color: #2d2d2d;
  font-weight: 600;
}

.btn-outline-primary {
  --bs-btn-color: #5b6770;
  --bs-btn-border-color: #5b6770;
  --bs-btn-hover-bg: #5b6770;
  --bs-btn-hover-border-color: #5b6770;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #5b6770;
  --bs-btn-active-border-color: #5b6770;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 91, 103, 112;
}

.btn-check:checked + .btn-outline-primary {
  background-color: #5b6770;
  border-color: #5b6770;
  color: #fff;
}

.bg-primary {
  background-color: #5b6770 !important;
}

.navbar {
  background: none !important;
}

.text-primary {
  color: #a5ce4d !important;
}

/* Mobile-first form improvements */
.form-control, .form-select {
  font-size: 16px; /* Prevents zoom on iOS */
  padding: 0.75rem;
}

.form-control::placeholder {
  color: #b0b8c1;
}

.form-control:focus, .form-select:focus {
  border-color: #a5ce4d;
  box-shadow: 0 0 0 0.2rem rgba(165, 206, 77, 0.25);
}

.btn {
  padding: 0.75rem 1.5rem;
  min-height: 44px; /* Touch target */
}

/* Code input for verification */
.code-input {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-family: monospace;
  border: 2px solid #dee2e6;
  border-radius: 0.375rem;
}

.code-input:focus {
  border-color: #a5ce4d;
  box-shadow: 0 0 0 0.2rem rgba(165, 206, 77, 0.25);
  outline: none;
}

/* Card improvements */
.card {
  border-radius: 0.5rem;
}

.card-selectable {
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.card-selectable:hover {
  border-color: #a5ce4d;
}

.card-selectable.selected {
  border-color: #a5ce4d;
  border-width: 2px;
  background-color: rgba(165, 206, 77, 0.08);
}

/* Status badges */
.badge-status-active {
  background-color: #a5ce4d;
  color: #2d2d2d;
}

.badge-status-renewal {
  background-color: #ffc107;
  color: #000;
}

.badge-status-expired {
  background-color: #6c757d;
}

.badge-status-cancelled {
  background-color: #6c757d;
}

/* Premium display */
.premium-box {
  background-color: rgba(91, 103, 112, 0.05);
  border: 1px solid rgba(91, 103, 112, 0.1);
  border-radius: 0.375rem;
  padding: 0.75rem;
}

/* Summary total row */
.summary-total {
  background-color: #5b6770;
  color: #fff;
  border-radius: 0.375rem;
  padding: 1rem;
}

/* Feature badge */
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background-color: rgba(165, 206, 77, 0.15);
  border-radius: 0.25rem;
  font-size: 0.85rem;
}

/* Declaration scroll box */
.declaration-box {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  background-color: #f8f9fa;
}

/* Success page */
.success-icon {
  font-size: 4rem;
  color: #a5ce4d;
}

/* Dashboard stat cards */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-card .stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #5b6770;
}

/* Links */
a {
  color: #5b6770;
}

a:hover {
  color: #4a555d;
}

/* YesNo toggle selected state green accent */
.btn-check:checked + .btn-outline-primary {
  background-color: #5b6770;
  border-color: #5b6770;
}


/* Secondary button overrides */
.btn-outline-secondary {
  --bs-btn-color: #5b6770;
  --bs-btn-border-color: #5b6770;
  --bs-btn-hover-bg: #5b6770;
  --bs-btn-hover-border-color: #5b6770;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #5b6770;
  --bs-btn-active-border-color: #5b6770;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 91, 103, 112;
}

/* Dropdown active/focus override */
.dropdown-item:active,
.dropdown-item.active {
  background-color: #5b6770;
}

/* Bootstrap link/focus overrides */
.form-check-input:checked {
  background-color: #5b6770;
  border-color: #5b6770;
}

.form-check-input:focus {
  border-color: #a5ce4d;
  box-shadow: 0 0 0 0.25rem rgba(165, 206, 77, 0.25);
}

/* Inline spinning icon (used on refresh buttons) */
.bi.spinner {
  display: inline-block;
  animation: bi-spin 0.8s linear infinite;
}

@keyframes bi-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Navbar logo sizing — fluid so Safari/mobile don't dodge the breakpoint.
   Scales between ~36px tall on phones and 60px on desktop, never wider than half the viewport. */
.navbar-logo {
  height: clamp(36px, 7vw, 60px);
  width: auto;
  max-width: 50vw;
  object-fit: contain;
}
