/* =========================
static/styles.css - Professional Finance Theme (Responsive)
========================= */
:root { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --primary-blue: #1a365d;
  --accent-blue: #2563eb;
  --light-blue: #eff6ff;
  --dark-gray: #1f2937;
  --medium-gray: #6b7280;
  --light-gray: #f8fafc;
  --border-color: #e2e8f0;
  --success-green: #059669;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-mobile: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body { 
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
  margin: 0; 
  padding: 16px; 
  min-height: 100vh;
  display: flex; 
  justify-content: center; 
  align-items: flex-start;
  font-size: 16px;
  line-height: 1.5;
}

.card { 
  background: #fff; 
  max-width: 600px; 
  width: 100%; 
  padding: 24px; 
  border-radius: 12px; 
  box-shadow: var(--shadow-mobile);
  border: 1px solid var(--border-color);
  margin-top: 20px;
}

h1 { 
  margin-top: 0; 
  margin-bottom: 8px;
  font-size: 24px; 
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.subtitle {
  text-align: center;
  color: var(--medium-gray);
  font-size: 14px;
  margin-bottom: 24px;
  font-weight: 400;
  line-height: 1.4;
}

label { 
  display: block; 
  margin-top: 16px; 
  margin-bottom: 6px;
  font-weight: 600; 
  color: var(--dark-gray);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="email"], input[type="text"], input[type="number"], select {
  width: 100%; 
  padding: 12px 14px; 
  border: 2px solid var(--border-color); 
  border-radius: 8px; 
  font-size: 16px; 
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}

input:focus, select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
  margin-top: 20px; 
  background: var(--accent-blue); 
  color: white; 
  border: none; 
  padding: 14px 20px; 
  border-radius: 8px; 
  font-size: 16px; 
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease, transform 0.1s ease;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  min-height: 48px;
  touch-action: manipulation;
}

button:hover { 
  background: #1d4ed8; 
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

@media (hover: none) {
  button:hover {
    transform: none;
  }
}

.hint { 
  color: var(--medium-gray); 
  font-size: 12px; 
  margin-top: 8px; 
  line-height: 1.5;
}

.suggestions { 
  border: 2px solid var(--border-color); 
  border-top: none; 
  max-height: 180px; 
  overflow: auto; 
  background: #fff;
  border-radius: 0 0 8px 8px;
  position: relative;
  z-index: 100;
}

.suggestion { 
  padding: 10px 14px; 
  cursor: pointer; 
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
  font-size: 14px;
}

.suggestion:hover { 
  background: var(--light-blue); 
}

.suggestion:last-child {
  border-bottom: none;
}

.chosen { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  margin-top: 12px; 
}

.selected-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--light-blue);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  width: 100%;
}

.ticker-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.ticker-code {
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 14px;
}

.company-name {
  font-size: 12px;
  color: var(--medium-gray);
}

.ticker-mode {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  background-color: #fff;
  margin-left: auto; /* Pushes dropdown to the right but allows button to be after it */
}

.remove-ticker {
  background: transparent;
  border: none;
  color: var(--medium-gray);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.remove-ticker:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

.chip { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  padding: 6px 10px; 
  background: var(--light-blue); 
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 13px;
  min-height: 32px;
}

.chip-code { 
  font-weight: 700; 
  color: var(--primary-blue);
}

.chip-mode { 
  border: none; 
  background: transparent; 
  outline: none; 
  color: var(--medium-gray);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 500;
  min-width: 60px;
}

.chip-x { 
  background: transparent; 
  border: none; 
  font-size: 14px; 
  line-height: 1; 
  cursor: pointer; 
  padding: 2px 4px; 
  color: var(--medium-gray);
  transition: color 0.2s ease;
  min-height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-x:hover {
  color: #dc2626;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
  body {
    padding: 24px;
  }
  
  .card {
    padding: 32px;
    margin-top: 40px;
  }
  
  h1 {
    font-size: 26px;
  }
  
  .subtitle {
    font-size: 15px;
    margin-bottom: 28px;
  }
  
  label {
    margin-top: 18px;
    font-size: 14px;
  }
  
  input[type="email"], input[type="text"], input[type="number"], select {
    padding: 13px 15px;
  }
  
  button {
    margin-top: 22px;
    padding: 15px 22px;
  }
  
  .suggestions {
    max-height: 200px;
  }
  
  .suggestion {
    padding: 11px 15px;
    font-size: 15px;
  }
  
  .chosen {
    gap: 7px;
    margin-top: 14px;
  }
  
  .chip {
    padding: 7px 11px;
    font-size: 14px;
  }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
  body {
    padding: 40px 20px;
    align-items: center;
  }
  
  .card {
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 0;
  }
  
  h1 {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  label {
    margin-top: 20px;
    font-size: 14px;
  }
  
  input[type="email"], input[type="text"], input[type="number"], select {
    padding: 14px 16px;
  }
  
  button {
    margin-top: 24px;
    padding: 16px 24px;
  }
  
  .suggestions {
    max-height: 220px;
  }
  
  .suggestion {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  .chosen {
    gap: 8px;
    margin-top: 16px;
  }
  
  .chip {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .chip-mode {
    font-size: 12px;
  }
  
  .chip-x {
    font-size: 16px;
  }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 767px) {
  input[type="email"], input[type="text"], input[type="number"], select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .chip-x {
    min-height: 32px;
    min-width: 32px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card {
    border-width: 0.5px;
  }
  
  input[type="email"], input[type="text"], input[type="number"], select {
    border-width: 1px;
  }
  
  .suggestions {
    border-width: 1px;
  }
}

