/* Main stylesheet for Ventura Stock Compensation Dashboard */

:root {
  --primary-color: #4a90e2;
  --secondary-color: #28a745;
  --dark-color: #1a1a1a;
  --darker-color: #121212;
  --card-bg: #1e1e1e;
  --card-header-bg: rgba(40, 44, 52, 0.6);
  --border-color: #444;
  --text-color: #ffffff;
  --input-bg: #333;
  --input-border: #555;
  --input-text: white;
  --table-border: #444;
  --table-header: #3a3a3a;
  --table-row-even: #333;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--dark-color);
  color: var(--text-color);
  min-height: 100vh;
}

body.dark-mode {
  background-color: var(--dark-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 0.8rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header styles */
header {
  background: linear-gradient(145deg, #1c2526, #2a2a2a);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

/* Headings */
h1, h2, h3 {
  font-weight: 600;
  color: var(--text-color);
}

/* Section styling */
section {
  margin: 20px 0;
  padding: 20px;
}

/* General input styling */
input[type="number"], input[type="text"], input[type="date"], select {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  padding: 5px;
  border-radius: 5px;
  width: 200px;
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

th, td {
  border: 1px solid var(--table-border);
  padding: 8px;
  text-align: left;
}

th {
  background-color: var(--table-header);
}

tr:nth-child(even) {
  background-color: var(--table-row-even);
}

/* Button group */
.button-group {
  display: flex;
  gap: 5px;
}

/* General button styling */
button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.1s;
}

button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Specific button styles */
.delete-button {
  background-color: #e24a4a;
}

.simulate-button, .back-button {
  background-color: var(--secondary-color);
}

/* User input section */
.user-input {
  background-color: var(--card-bg);
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  margin-bottom: 15px;
}

.user-input h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.user-input label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.user-input input, .user-input select {
  width: 150px;
  margin-bottom: 0;
}

.user-input select#filingStatus {
  width: 200px;
}

/* Compact form */
.compact-form {
  max-width: 100%;
}

/* Input grid */
.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

/* Input group */
.input-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  position: relative;
}

.input-group label {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.input-group input,
.input-group select {
  padding: 5px;
  font-size: 0.9rem;
  border-radius: 5px;
}

/* Card-based layout for User and Stock Information */
.info-card-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}

.info-card {
  background-color: rgba(40, 44, 52, 0.4);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-header {
  background-color: rgba(40, 44, 52, 0.6);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #e2e2e2;
}

.card-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(74, 144, 226, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.card-body {
  padding: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-grid .input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  position: relative;
}

.card-grid label {
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 500;
  color: #adb5bd;
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-grid .input-group input,
.card-grid .input-group select,
.card-grid .input-group input[type="date"] {
  width: 100%;
  height: 32px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  color: white;
  font-family: 'Inter', sans-serif;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  line-height: normal;
}

/* Direct styling for state and sale date fields to ensure identical sizing */
#state, #saleDate {
  width: 40%;
  height: 32px;
  box-sizing: border-box;
  min-width: 0;
}

/* Special override for Safari to ensure consistent date input sizing */
@media not all and (min-resolution:.001dpcm) { 
  @supports (-webkit-appearance:none) {
    .card-grid .input-group input[type="date"],
    #saleDate {
      height: 32px;
    }
  }
}

/* Firefox specific corrections */
@-moz-document url-prefix() { 
  .card-grid .input-group input[type="date"],
  .card-grid .input-group select,
  #state, #saleDate {
    height: 32px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

/* Custom styles for select dropdown arrow - apply to all selects */
select {
  /* Hide the default browser arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  
  /* Add custom arrow */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 30px;
}

/* Hide IE 10+ arrow */
select::-ms-expand {
  display: none;
}

/* Improve date input calendar icon for Firefox */
.card-grid .input-group input[type="date"]::-moz-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
}

/* Improve date input calendar icon for Chrome */
.card-grid .input-group input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
}

.card-grid .input-group input:focus,
.card-grid .input-group select:focus {
  border-color: #4a90e2;
  background-color: rgba(74, 144, 226, 0.1);
  outline: none;
}

.card-grid .input-group input:hover,
.card-grid .input-group select:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Adjust tooltip container for compact version */
.card-grid .tooltip-container {
  transform: scale(0.9);
  margin-left: 3px;
}

/* Adjust user-input section */
.user-input {
  padding: 15px;
  margin-bottom: 15px;
}

.user-input h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* Responsive adjustments for cards */
@media (max-width: 1200px) {
  .info-card-container {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .double-width {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .double-width {
    grid-column: span 1;
  }
}

/* Tabs */
.tabs .tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tab-button {
  background-color: #333;
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  color: white;
}

.tab-button.active {
  background-color: var(--primary-color);
}

.tab-content .tab-pane {
  display: none;
}

.tab-content .tab-pane.active {
  display: block;
  background-color: #333;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
}

/* Grants summary table */
.grants-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.grants-summary table input[type="number"] {
  background-color: #333;
  color: white;
  border: 1px solid #555;
  padding: 5px;
  border-radius: 5px;
  width: 100px;
}

.grants-summary thead {
  position: static;
  background-color: #3a3a3a;
}

.grants-summary td input:disabled {
  border: 1px dashed #888;
  color: #888;
  cursor: not-allowed;
  background-color: transparent;
}

/* Allow table headers to wrap text */
.grants-summary th {
  white-space: normal;
  word-wrap: break-word;
  hyphens: auto;
}

/* Apply uniform font size reduction to all Grants Summary table headers for consistency */
#tab2GrantsSummaryTable th {
  font-size: 0.85rem;
}

/* Reduce font size for Tax Impact columns specifically */
#tab2GrantsSummaryTable th:nth-child(12),
#tab2GrantsSummaryTable td:nth-child(12) {
  font-size: 0.85rem;
}

#tab2PrivateStockSummaryTable th:nth-child(11),
#tab2PrivateStockSummaryTable td:nth-child(11) {
  font-size: 0.85rem;
}

/* Tab 2 table column width optimization to fit within section margins */
/* Grant ID column (1st) - much narrower */
#tab2GrantsSummaryTable th:nth-child(1),
#tab2GrantsSummaryTable td:nth-child(1) {
  width: 60px;
  max-width: 60px;
  text-align: center;
}

/* Grant Type column (2nd) - narrow for ISO/NQ */
#tab2GrantsSummaryTable th:nth-child(2),
#tab2GrantsSummaryTable td:nth-child(2) {
  width: 65px;
  max-width: 65px;
  text-align: center;
}

/* Exercised Units column (6th) - narrower */
#tab2GrantsSummaryTable th:nth-child(6),
#tab2GrantsSummaryTable td:nth-child(6) {
  width: 95px;
  max-width: 95px;
  text-align: center;
}

/* Unvested Units column (7th) - narrower */
#tab2GrantsSummaryTable th:nth-child(7),
#tab2GrantsSummaryTable td:nth-child(7) {
  width: 80px;
  max-width: 80px;
  text-align: center;
}

/* Tax Impact column (12th) - constrain width further */
#tab2GrantsSummaryTable th:nth-child(12),
#tab2GrantsSummaryTable td:nth-child(12) {
  width: 85px;
  max-width: 85px;
  text-align: center;
  font-size: 0.85rem;
}

/* Shares to Sell column (13th) - narrower input */
#tab2GrantsSummaryTable th:nth-child(13),
#tab2GrantsSummaryTable td:nth-child(13) {
  width: 70px;
  max-width: 70px;
  text-align: center;
}

/* Align the last 5 columns between Grants Summary and Employee Stock Summary tables */
/* Total Value / Current Value columns - set consistent width */
#tab2GrantsSummaryTable th:nth-child(10),
#tab2GrantsSummaryTable td:nth-child(10),
#tab2PrivateStockSummaryTable th:nth-child(9),
#tab2PrivateStockSummaryTable td:nth-child(9) {
  width: 120px;
  max-width: 120px;
  text-align: right;
}

/* Vested PnL / PnL columns - increased width for larger numbers */
#tab2GrantsSummaryTable th:nth-child(11),
#tab2GrantsSummaryTable td:nth-child(11),
#tab2PrivateStockSummaryTable th:nth-child(10),
#tab2PrivateStockSummaryTable td:nth-child(10) {
  width: 130px;
  max-width: 130px;
  text-align: right;
  font-size: 0.85rem;
}

/* Tax Impact columns - already have 85px width, ensure both tables match */
#tab2GrantsSummaryTable th:nth-child(12),
#tab2GrantsSummaryTable td:nth-child(12),
#tab2PrivateStockSummaryTable th:nth-child(11),
#tab2PrivateStockSummaryTable td:nth-child(11) {
  width: 85px;
  max-width: 85px;
  text-align: center;
  font-size: 0.85rem;
}

/* Shares to Sell columns - set consistent width */
#tab2GrantsSummaryTable th:nth-child(13),
#tab2GrantsSummaryTable td:nth-child(13),
#tab2PrivateStockSummaryTable th:nth-child(12),
#tab2PrivateStockSummaryTable td:nth-child(12) {
  width: 70px;
  max-width: 70px;
  text-align: center;
}

/* PnL Generated columns - increased width for larger numbers */
#tab2GrantsSummaryTable th:nth-child(14),
#tab2GrantsSummaryTable td:nth-child(14),
#tab2PrivateStockSummaryTable th:nth-child(13),
#tab2PrivateStockSummaryTable td:nth-child(13) {
  width: 130px;
  max-width: 130px;
  text-align: right;
  font-size: 0.85rem;
}

/* Make input fields in narrow columns smaller */
#tab2GrantsSummaryTable td:nth-child(13) input[type="number"] {
  width: 55px;
  padding: 3px;
  font-size: 0.9rem;
}

/* Ensure text wraps in narrow columns */
#tab2GrantsSummaryTable th:nth-child(1),
#tab2GrantsSummaryTable th:nth-child(2),
#tab2GrantsSummaryTable th:nth-child(6),
#tab2GrantsSummaryTable th:nth-child(7),
#tab2GrantsSummaryTable th:nth-child(12),
#tab2GrantsSummaryTable th:nth-child(13) {
  white-space: normal;
  word-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
}

/* AMT section */
.amt-section {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.amt-calculator,
.calculation-details {
    flex: 1;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.amt-calculator h3,
.calculation-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
}

.amt-calculator .button-group {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.amt-calculator .button-group button {
    background-color: var(--secondary-color);
    padding: 5px 10px;
    font-size: 0.9rem;
}

.amt-calculator p {
    margin: 5px 0;
    font-size: 0.9rem;
    position: relative;
    color: var(--text-color);
}

.amt-calculator p span.calculated {
    display: inline-block;
    padding: 2px 8px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 10px;
    font-weight: bold;
}

.amt-calculator p span.main-output {
    display: inline-block;
    padding: 5px 12px;
    background-color: #e67e22;
    color: white;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.calculation-details {
    flex: 1;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
    overflow-wrap: break-word;
}

.calculation-details h3 {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.calculation-details p {
    margin: 5px 0;
    color: var(--text-color);
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculation-details .calculated {
    font-weight: bold;
    color: var(--text-color);
    background: rgba(74, 144, 226, 0.2);
    padding: 3px 6px;
    border-radius: 3px;
    min-width: 80px;
    text-align: right;
}

.methodologies {
    flex: 1;
    padding: 15px;
    background-color: var(--card-bg);
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
    overflow-wrap: break-word;
    margin-left: 10px;
}

.methodologies h4 {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.methodologies ol {
    padding-left: 20px;
    margin: 0;
    color: var(--text-color);
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.4;
}

/* Specific styling for AMT Payable value */
#tab1AmtPayable {
  color: #e67e22;
  font-weight: bold;
}

/* Calculator graphic styles */
.tab1-styled .bar-ordinary {
  background: linear-gradient(to bottom, #28a745, #20c997);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  color: white;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  border: none;
  position: relative;
  transition: all 0.5s ease;
  transform-origin: bottom;
  clip-path: inset(0 0 0 0 round 6px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
  padding: 5px 0;
}

.tab1-styled .bar-amt-main {
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tab1-styled .amt-tax-free {
  background: linear-gradient(to bottom, #28a745, #20c997);
  border-radius: 6px 6px 0 0;
  color: white;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  overflow: hidden;
  padding: 5px 0;
  min-height: 40px;
}

.tab1-styled .amt-overage {
  background: linear-gradient(to bottom, #fd7e14, #e67e22);
  border: none;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 11px;
  overflow: hidden;
  padding: 5px 0;
}

/* Tooltip container and icon styling */
.tooltip-container {
  display: inline-block;
  margin-left: 5px;
  position: relative;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #888;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tooltip-icon:hover {
  background: #28a745;
}

/* Disable these CSS-based tooltips since we're using JavaScript-based tooltips now */
/* 
.tooltip-container[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  min-width: 120px;
}

.tooltip-container[data-tooltip]:hover::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-5px) rotate(180deg);
  border-width: 5px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  z-index: 10;
}
*/

/* Media Queries */
@media (max-width: 768px) {
  .input-grid {
    grid-template-columns: 1fr;
  }
  .amt-section {
    flex-direction: column;
  }
  .amt-calculator,
  .calculation-details {
    flex: none;
  }
  .amt-calculator {
    flex-direction: column;
  }
  .amt-calculator-graphic {
    justify-content: center;
  }
  .bar {
    width: 60px;
  }
  .bar-label {
    font-size: 12px;
  }
  .amt-overage {
    font-size: 8px;
  }
  .tax-free-label,
  .amt-payable-label {
    font-size: 6px;
  }
  .tooltip:hover::after {
    bottom: auto;
    top: -100%;
    white-space: normal;
    max-width: 200px;
  }
}

.disclaimer-section {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #444;
  background-color: #2a2a2a;
  text-align: left;
}

.disclaimer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #cccccc;
}

.disclaimer {
  font-size: 0.75rem;
  color: #666666;
  font-style: italic;
  line-height: 1.5;
}

.disclaimer p {
  margin: 10px 0;
}

.disclaimer strong {
  color: #ffffff;
  font-style: normal;
}

@media (max-width: 600px) {
  .disclaimer-section {
    padding: 15px;
  }
  .disclaimer-section h3 {
    font-size: 1rem;
  }
  .disclaimer {
    font-size: 0.65rem;
  }
}

.dashboard-container {
  background-color: var(--dark-color);
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100%;
}

.header-left {
  padding-left: 20px;
}

.subtitle {
  font-size: 1.2rem;
  color: #cccccc;
  margin-top: 5px;
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-button {
  background-color: #333;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.nav-button:hover {
  background-color: #28a745;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 400px;
  min-height: 300px;
}

/* Updated Chart Controls for Horizontal Layout and Spacing */
.chart-controls {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.chart h3 {
  margin-bottom: 20px;
}

.vested-value-sum {
  font-size: 1.1rem;
  font-weight: bold;
  color: #28a745;
  margin: 0;
  white-space: nowrap;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 30px;
}

.input-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.input-group label {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.input-group input[type="text"],
.input-group input[type="number"] {
  padding: 5px;
  font-size: 0.9rem;
  border-radius: 5px;
  width: 100px;
}

.small-input {
  width: 120px;
}

.input-group.checkbox-group {
  flex-direction: row;
  align-items: center;
}

.input-group.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.input-group input[type="checkbox"] {
  margin: 0;
}

tr:hover {
  background-color: #444;
}

.section-divider {
  border: 0;
  border-top: 1px solid #444;
  margin: 30px 0;
}

/* Section Header for Summary Bubble */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Summary Bubble Styling */
.summary-bubble {
  background-color: #50c878;
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .price-inputs {
    flex-direction: column;
    gap: 10px;
  }

  .input-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-container {
    height: 300px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .summary-bubble {
    width: 100%;
    text-align: center;
  }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 1000;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4a90e2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

#loadingMessage {
  color: white;
  font-size: 18px;
}

/* Error Container */
.error-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #d9534f;
  color: white;
  padding: 15px 25px;
  border-radius: 5px;
  z-index: 1001;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  max-width: 80%;
  text-align: center;
}

#errorMessage {
  font-size: 16px;
  font-weight: 500;
}

/* Add styles for validation tooltips */
.validation-tooltip {
  position: fixed !important;
  background-color: white;
  color: black;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  max-width: 250px;
  white-space: normal;
  pointer-events: none;
}

.validation-tooltip::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 100%;
  border-width: 8px;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.validation-tooltip .tooltip-icon {
  background-color: #f0ad4e;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  flex-shrink: 0;
}

.validation-tooltip .tooltip-icon i {
  font-style: normal;
  font-weight: bold;
  font-size: 14px;
}

/* Ensure input groups have relative positioning for tooltips */
.input-group {
  position: relative;
}

/* Ensure section borders don't clip tooltips */
section {
  overflow: visible !important;
}

/* Make sure card elements don't clip tooltips */
.card {
  overflow: visible !important;
}

/* Make sure all containers don't clip tooltips */
.container, .card-body, .user-input, .form-group, .info-card, .info-card-container {
  overflow: visible !important;
}

/* AMT section styling improvements */
.amt-calculator-graphic {
  position: relative;
  display: flex;
  gap: 20px;
  align-items: flex-end;
  height: auto;
  margin-top: 70px;
  margin-bottom: 120px;
  padding-bottom: 50px;
}

.x-axis {
  position: absolute;
  bottom: 135px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #555;
}

.bar {
  width: 90px;
  position: relative;
  text-align: center;
  margin-bottom: 80px;
  transition: transform 0.3s ease;
}

.bar-label {
  position: absolute;
  bottom: -75px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  color: #adb5bd;
}

/* Align calculation details with methodologies */
.calculation-details h3,
.methodologies h4 {
  font-size: 16px;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

/* Detail section styling */
.detail-section {
  margin-bottom: 15px;
  padding-bottom: 8px;
}

.detail-section:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-section h4 {
  font-size: 14px;
  color: #adb5bd;
  margin: 0 0 8px 0;
  font-weight: 600;
}

/* Tab1 specific styling */
.tab1-styled .amt-calculator {
  display: flex;
  gap: 20px;
}

.tab1-styled .amt-calculator-content {
  max-width: 350px;
}

.tab1-styled #tab1SaleCalculatorResults {
  max-width: 350px;
}

/* Ensure consistent output styling */
.amt-calculator p span.calculated {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 10px;
  font-weight: bold;
  float: right;
  min-width: 80px;
  text-align: right;
}

/* Format the AMT payable value */
#tab1AmtPayable {
  color: #e67e22;
  font-weight: bold;
  display: inline-block;
  padding: 3px 8px;
  background-color: rgba(230, 126, 34, 0.2);
  border-radius: 4px;
  min-width: 80px;
  text-align: right;
}

/* Portfolio Summary Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-card {
    background-color: #2d3748;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.double-width {
    grid-column: span 2;
}

.summary-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.summary-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #e2e8f0;
}

.summary-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

/* Value breakdown styles */
.value-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.value-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.value-label {
    font-size: 0.9rem;
    color: #a0aec0;
}

.value-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Progress bar styles */
.progress-bar-container {
    height: 8px;
    background-color: #4a5568;
    border-radius: 4px;
    margin: 0.5rem 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4a90e2;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-details {
    font-size: 0.8rem;
    color: #a0aec0;
    text-align: right;
}

/* Mini chart container */
.mini-chart-container {
    width: 100%;
    height: 100%;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* For smaller screens, adjust the grid layout */
@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .double-width {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .double-width {
        grid-column: span 1;
    }
}

