/* General Page Styling */
body {
    font-family: 'Segoe UI', 'Segoe UI Web (West European)';
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
    letter-spacing: 0.1px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
  }
  
  .hidden {
    display: none !important;
  }
  
  .container {
    width: 100%;
    max-width: 1600px;
    margin: 20px auto;
    background: #f5f7fa;
    padding: 10px;
  }
  
  /* Header */
  header {
    text-align: center;
    padding-bottom: 10px;
    max-width: 800px;
    margin:0 auto
  }
  
  header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 3px;
    font-family:'Segoe UI', "Segoe UI Web (West European)", Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
  }
  
  header p {
    font-size: 14px;
    color: #555;
    margin: 5px 0 10px 2px;
    line-height: 20px;
  }
  hr{
    margin-top:20px;
    margin-bottom:20px;
  }
  .pricing-info {
    margin-top: 10px;
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    max-width: 800px;
    margin:0 auto
  }
    .pricing-link {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
  }
  .pricing-info p {
    font-size: 14px;
    color: #000;
    margin-left:10px
  }
  
  a {
    color: #115EA3; /* Fluent blue */
    font-style:none;
    font-weight:400;
    text-decoration: underline;
  }
  
  .pricing-info a:hover {
    text-decoration: underline;
  }
  .pricing-info .dropdowns {
    display: flex;
    flex-wrap: nowrap; /* Ensure dropdowns stay on the same line */
    gap: 1rem; /* Space between dropdowns */
    align-items: center;
    margin-bottom: 1rem;
    justify-content: space-between; /* Space out the dropdowns */
  }
  .pricing-info .dropdowns select {
    flex: 1; /* Make dropdowns take equal space */
    max-width: 48%; /* Ensure both dropdowns together take up half the screen */
    min-width: 250px; /* Ensure a minimum width */
    padding: 0.5rem 2rem 0.5rem 0.5rem; /* Add padding for the dropdown arrow */
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23333'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    background-size: 1rem;
    appearance: none; /* Remove default dropdown arrow */
    color: #ccc;
  }
  .pricing-info .dropdowns select:focus {
    border-color: #0078D4; /* Fluent blue for focus */
    outline: none;
}

.pricing-info .dropdowns select option {
    color: #333; /* Default text color for options */
}

.pricing-info .dropdowns select option:checked {
    color: gray; /* Gray text for the selected option */
}
  .pricing-info .exchange-rate {
    margin-top: 0.5rem;
    font-size: 12px;
    color: #0078D4;
    flex-basis: 100%; /* Make the exchange rate take the full width */
  }
 /* make padding behave */
*, *::before, *::after {
  box-sizing: border-box;
}

/* new grid layout for your pairs */
.input-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; 
  align-items:end;           
  /* gutter between the two halves */
}

/* make your inputs fill the cell */
.input-pair input,
.input-pair select {
  width: 100%;
}

  /* Layout */
  .estimator-layout {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 5px;
  }
  
  /* Form Panel */
  .estimator-form {
    flex: 1.5;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .estimator-form h2 {
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #0078D4;
    padding-bottom: 5px;
    margin-bottom: 15px;
  }
  
  .estimator-form h3 {
    color: black;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    word-wrap: break-word;
    margin-top:2px;
    margin-bottom: 2px;
  }
  
  .estimator-form p {
    color: black;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    word-wrap: break-word;
    margin-top:2px;
    margin-bottom: 16px;
    max-width: 650px;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  label {
    display: block;
    font-weight: 400;
    font-size:14px;
    padding-bottom: 8px;
  }
   .radio-group label {
    display: block;
    font-weight: 400;
    font-size:14px;
    padding-bottom:0px;
  }
  label.required::after {
    content: " *";
    color: red;
  }
  
  /* Inputs */
  input,
  select {
    width: 75%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  input[type="number"],
  input[type="text"] {
    outline: none;
    transition: border-color 0.2s ease-in-out;
  }
  
  input[type="number"]:focus,
  input[type="text"]:focus {
    border-bottom: 2px solid #106ebe; /* Fluent blue */
  }
  
  .radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top:12px;
  }
  
  .stacked-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .radio-group input {
    width: auto;
    accent-color: #0078d4;
  }
  .radio-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
  }
  
  .radio-option input[type="radio"] {
    flex-shrink: 0;
    margin-top: 4px; /* vertically align with start of text */
    width:2%;
    padding:0;
    margin-top:3px;
    margin-left:0;
    accent-color: #0078d4;
  }
  /* Buttons (optional, keep if used) 
  button {
    width: 20%;
    float:right;
    padding: 12px;
    background: linear-gradient(90deg, #0078D4, #00A2E8);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
  }*/
  
  button:hover {
    background: linear-gradient(90deg, #005A9E, #0084C9);
  }
   fluent-button::part(control) {
        border-radius: 6px;
        padding: 10px 18px;
        font-size: 16px;
      }

      /* Size/align the leading icon */
      .icon {
        width: 18px;
        height: 18px;
        display: inline-block;
      }
      /* Prevent the SVG from shrinking weirdly */
      .icon svg { width: 100%; height: 100%; display: block; }
.button-container{
    margin-top: 10px;
    text-align: center;
    max-width: 1200px;
    margin:0 auto
}
.button-group {
/* Auto layout */
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
padding-top: 0px;
margin-bottom: 20px;
gap: 10px;
/* Inside auto layout */
flex: none;
order: 1;
align-self: stretch;
flex-grow: 0;
}
  /* Estimation Panel */
  .estimation-panel {
    flex: 1;
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  }
  
  .estimation-panel h2 {
    font-size: 20px;
    color: #0F6CBD;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
  }
  .estimation-panel .total-messages {
    float: right;
  }
  .estimation-section {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
  }
  
  .estimation-section h3 {
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    color: #333;
  }
  
  .total-messages,
  .auto-calc {
    font-size: 22px;
    font-weight: bold;
    color: #007bff;
  }
  
  .total-messages {
    float: left;
  }
  
  .auto-calc {
    float: left;
  }
  
  /* Message Display Formatting */
  ul {
    list-style: none;
    padding-left: 8px;
    font-size: 14px;
    list-style-position: outside;

  }
  ul li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding-left: 1.2em;
    padding-bottom: 10px;
    gap: 0;
    min-height:1.5em;
  }
  ul span.listnote {
    font-size: 14px;
    font-style: italic;
    color: #555;
    line-height: 20px;
    letter-spacing: 0px;
    font-weight: 400;
    padding-left: 0;
  }
  
  ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    top:0;
    color: black;
    font-size: 1.2em;
    line-height: 1;
  }
  
  .message-value {
    color: #007bff;
    font-weight: bold;
  }
  
  .message-sub-value {
    color: #333;
    font-weight: 600;
    flex-shrink: 0;
    float: right;
    margin-left:3rem;
  }
  
  /* Message Table */
  .message-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
  }
  
  .message-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
  }
  
  .message-row span {
    font-size: 14px;
    color: #555;
  }
  
  .message-row:last-child {
    border-bottom: none;
  }
  
  .sub-message-value {
    font-weight: bold;
    color: #007bff;
  }
  th{
    font-weight:normal;
    color: #555;
  }
  .tooltip-wrapper {
    display: inline-block;
    position: relative;
}

.info-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background-color: transparent;
    color: #333;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin-left: 0.3rem;
    transition: background 0.2s;
}

.info-circle:hover {
    background-color: #f3f2f1;
}

.tooltip-text {
    visibility: hidden;
    background-color: #fff;
    color: #5d5d5d;
    font-weight: 400;;
    font-size:12px;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 1000;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 280px;
    width: max-content;
    box-shadow: 0px 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: normal; /* allow wrapping */
}

.tooltip-wrapper:hover .tooltip-text,
.tooltip-wrapper:focus-within .tooltip-text {
    visibility: visible;
    opacity: 1;
}
.trigger-wrapper {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
}

.trigger-wrapper label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.trigger-wrapper input[type="number"],
.trigger-wrapper input[type="radio"] {
  margin-bottom: 1rem;
  display: block;
}
.legal p {
  font-size: 14px;
  color: #555;
  line-height: 20px;
  max-width:800px;
  text-align: center;
  padding-top:10px;
  margin:0 auto
}
#promptToolInfoGroup table {
  width: 100%;
  table-layout: fixed;       /* enforce equal column widths */
  border-collapse: collapse; /* optional but usually nice */
}

#promptToolInfoGroup th,
#promptToolInfoGroup td {
  padding: .5rem;         /* all sides */
  padding-left: 0;        /* override left */
  font-size:14px;
  text-align: left;
  vertical-align: middle;
  /* each column will automatically be 33.33% wide because of table-layout:fixed */
}

#promptToolInfoGroup input {
  width: 100%;              /* fill the cell */
  box-sizing: border-box;   /* include padding/border in that width */
}
.trigger-wrapper h3{
  font-size: 16px;
  font-weight: semibold;
  display: flex;
  justify-content: space-between;
  color: #333;
  margin-bottom:16px;
}
.trigger-wrapper .input-pair-1 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; 
  align-items:anchor-center;           
  /* gutter between the two halves */
}
.trigger-wrapper .input-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px; 
  align-items:end;           
  /* gutter between the two halves */
}
.disabled {
  opacity: 0.5;
  pointer-events: none;
}
/* Add media queries and responsive improvements to the existing CSS */

/* Media Queries for Responsive Design */

/* Large screens (default - already handled) */
@media screen and (max-width: 1400px) {
  .container {
    max-width: 1200px;
    padding: 15px;
  }
}

/* Medium screens - Tablets */
@media screen and (max-width: 1024px) {
  .container {
    padding: 10px;
  }
  
  .estimator-layout {
    flex-direction: column;
    gap: 15px;
  }
  
  .estimator-form,
  .estimation-panel {
    flex: none;
    width: 100%;
  }
  
  .input-pair {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .pricing-info .dropdowns {
    flex-direction: column;
    gap: 10px;
  }
  
  .pricing-info .dropdowns select {
    max-width: 100%;
    min-width: auto;
  }
  
  .button-group {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Small screens - Mobile landscape */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    margin: 10px auto;
    padding: 8px;
  }
  
  header {
    padding-bottom: 15px;
  }
  
  header h1 {
    font-size: 20px;
  }
  
  header p {
    font-size: 13px;
    line-height: 18px;
  }
  
  .estimator-form,
  .estimation-panel {
    padding: 15px;
  }
  
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .button-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .button-group fluent-button,
  .button-group a {
    width: 100%;
  }
  
  input,
  select {
    width: 100%;
  }
  
  .message-sub-value {
    margin-left: 1rem;
  }
}

/* Extra small screens - Mobile portrait */
@media screen and (max-width: 480px) {
  body {
    padding: 5px;
  }
  
  .container {
    margin: 5px auto;
    padding: 5px;
  }
  
  header h1 {
    font-size: 18px;
  }
  
  header p {
    font-size: 12px;
    line-height: 16px;
  }
  
  .estimator-form,
  .estimation-panel {
    padding: 12px;
  }
  
  .estimator-form h3 {
    font-size: 16px;
  }
  
  .estimator-form p {
    font-size: 13px;
    line-height: 18px;
  }
  
  .pricing-info {
    font-size: 16px;
  }
  
  .pricing-info p {
    font-size: 13px;
  }
  
  /* Stack table content vertically on very small screens */
  #promptToolInfoGroup table,
  #promptToolInfoGroup thead,
  #promptToolInfoGroup tbody,
  #promptToolInfoGroup th,
  #promptToolInfoGroup td,
  #promptToolInfoGroup tr {
    display: block;
  }
  
  #promptToolInfoGroup thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  #promptToolInfoGroup tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
  }
  
  #promptToolInfoGroup td {
    border: none;
    position: relative;
    padding: 8px 0;
  }
  
  #promptToolInfoGroup td:before {
    content: attr(data-label) ": ";
    font-weight: bold;
    display: inline-block;
    width: 100%;
    margin-bottom: 5px;
  }
  
  .message-sub-value {
    margin-left: 0.5rem;
    font-size: 12px;
  }
  
  .tooltip-text {
    max-width: 250px;
    font-size: 11px;
  }
}

/* Improve button responsiveness */
@media screen and (max-width: 1024px) {
  fluent-button::part(control) {
    padding: 8px 16px;
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  fluent-button::part(control) {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Make tooltips more mobile-friendly */
@media screen and (max-width: 768px) {
  .tooltip-text {
    bottom: auto;
    top: 100%;
    left: 0;
    transform: none;
    margin-top: 8px;
    max-width: 90vw;
  }
}