/* ShelfAssured Shared Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --sa-red: #C62828;
  --sa-red-hover: #9F1F1F;
  --sa-gray: #E5E7EB;
  --sa-gray-hover: #D1D5DB;
  --sa-gold: #F9A825;
  --sa-text: #374151;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #f3f4f6;
  color: #2d231e;
  -webkit-text-size-adjust: 100%;
}

/* On real mobile devices: full-screen, no phone frame */
@media (max-width: 500px) {
  body { background: #fcfbf9; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .shell { max-width: 100%; margin: 0; }
  .phone {
    background: #fcfbf9;
    border: none;
    border-radius: 0;
    min-height: 100dvh;
    overflow: visible;
  }
  .screen { padding: 1rem; min-height: 100dvh; }
  /* Prevent zoom on input focus */
  input, select, textarea { font-size: 16px !important; }
}

/* On desktop: keep the phone frame preview */
@media (min-width: 501px) {
  .shell { max-width: 420px; margin: 0 auto; }
  .phone {
    background: #fcfbf9;
    border: 4px solid #3d342f;
    border-radius: 1.5rem;
    overflow: hidden;
    min-height: 820px;
    position: relative;
  }
  .screen { padding: 1.25rem; min-height: 820px; }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.btn-red {
  background: var(--sa-red);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-red:hover {
  background: var(--sa-red-hover);
}

.btn-gray {
  background: var(--sa-gray);
  color: var(--sa-text);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-gray:hover {
  background: var(--sa-gray-hover);
}

.sa-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.brand-card {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.brand-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.taskbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: white;
  border-top: 1px solid #e5e7eb;
  padding: 0.75rem;
}

.taskbar button {
  background: none;
  border: none;
  padding: 0.5rem;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
}

.taskbar button:hover,
.taskbar button.active {
  color: var(--sa-red);
  font-weight: 600;
}

/* Form styles */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sa-red);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

/* Message styles */
.message {
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.message.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.message.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.message.info {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--sa-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Responsive design */
@media (max-width: 480px) {
  .shell {
    max-width: 100%;
    margin: 0;
  }
  
  .phone {
    border-radius: 0;
    border: none;
  }
  
  .screen {
    padding: 1rem;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}
