/* Color Variables */
:root {
  /* Brand Colors */
  --primary-orange: #FF6B35;
  --primary-dark: #2D3748;
  --accent-teal: #0D9488;
  --accent-yellow: #FBBF24;

  /* Text Colors */
  --text-dark: #1A202C;
  --text-gray: #718096;

  /* Background Colors */
  --bg-white: #FFFFFF;
  --bg-light: #F7FAFC;
  --sidebar-bg: #FFF7ED;

  /* Border Colors */
  --border-color: #E2E8F0;

  /* Button Colors */
  --button-navy: rgba(2, 10, 64, 1);
  --button-navy-hover: rgba(2, 10, 64, 0.9);

  /* Link Colors */
  --link-color: #06B6D4;
  --link-hover: #06B6D4;

  /* Alert Colors */
  --alert-red: #f44336;
  --alert-red-bg: rgba(244, 67, 54, 0.1);

  /* Tooltip Colors */
  --tooltip-bg: #1F2937;
  --tooltip-trigger: #3B82F6;
  --tooltip-trigger-hover: #2563EB;

  /* Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  padding: 2rem;
}

/* Two Column Layout */
.page-wrapper {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Main Content Area (75%) */
.main-content {
  flex: 3;
  background: var(--bg-white);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

/* Sidebar (25%) */
.sidebar {
  flex: 1;
  background: var(--sidebar-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-orange);
  position: sticky;
  top: 2rem;
  height: fit-content;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.sidebar h3 {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-orange);
}

.sidebar .section {
  margin-bottom: 1.5rem;
}

.sidebar .section h4 {
  color: var(--accent-teal);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sidebar ul {
  margin-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-gray);
}

.sidebar li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.sidebar .note {
  background: rgba(255, 107, 53, 0.1);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-top: 1rem;
}

.sidebar .note strong {
  color: var(--primary-orange);
}

/* Header */
h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 1.5rem 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-orange);
}

.intro {
  font-size: 0.95rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

/* Forms */
.form {
  margin-top: 2rem;
}

.form.top-form {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Input Type Toggle (Email/Phone) */
.input-type-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-type-toggle input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--button-navy);
  margin: 0;
}

.input-type-toggle label {
  margin-right: 1.5rem;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
}

.email_prompt {
  display: flex;
  gap: 0;
  max-width: 600px;
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

#input_value {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border-color);
  border-right: none;
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

#input_value:focus {
  border-color: var(--primary-orange);
}

#input_value::placeholder {
  color: var(--text-gray);
}

/* Buttons */
.button {
  padding: 0.875rem 2rem;
  background: var(--button-navy);
  color: white;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.button:hover {
  background: var(--button-navy-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(2, 10, 64, 0.3);
}

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

/* Clear button (full width like other sample sites) */
#clear_form .button {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.25rem;
  background-color: var(--alert-red-bg);
  border-left: 4px solid var(--alert-red);
  color: var(--alert-red);
  border-radius: 6px;
  margin: 1rem 0;
  max-width: 600px;
  display: none;
}

.closebtn {
  margin-left: 15px;
  color: var(--alert-red);
  font-weight: bold;
  float: right;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  opacity: 0.7;
}

/* Results Table */
#results_table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: visible;
}

#results_table tr {
  border-bottom: 1px solid var(--border-color);
}

#results_table tr:nth-child(even) {
  background-color: var(--bg-light);
}

#results_table tr:last-child {
  border-bottom: none;
}

#results_table td {
  padding: 1rem;
  vertical-align: top;
}

#results_table .label {
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  padding-right: 2rem;
  width: 15em;
}

#results_table .value {
  color: var(--text-gray);
  font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

#results_table .value pre {
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

/* Tooltip Styles */
.tooltip-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.tooltip-trigger {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--tooltip-trigger);
  color: white;
  border: none;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tooltip-trigger:hover {
  background-color: var(--tooltip-trigger-hover);
  transform: scale(1.05);
}

.tooltip-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--tooltip-bg);
  color: white;
  padding: 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  line-height: 1.4;
  min-width: 250px;
  max-width: 350px;
  white-space: normal;
  z-index: 10000;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s ease, visibility 0.2s ease;
  font-weight: 400;
  pointer-events: none;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
}

.tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 1024px) {
  .page-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    position: static;
    max-height: none;
  }
  
  body {
    padding: 1rem;
  }
  
  .main-content {
    padding: 1.5rem;
  }
  
  .email_prompt {
    flex-direction: column;
  }
  
  #input_value {
    border-right: 2px solid var(--border-color);
    border-bottom: none;
  }
  
  .button {
    width: 100%;
  }
}
