/*********************************
 * CSS File Index
 *********************************/

/* 1. Base Styles & Typography */
/* 2. Layout & Structure */
/* 3. General Content & Containers */
/* 4. Forms, Inputs, & Textareas */
/* 5. Buttons & Controls */
/* 6. Components (e.g., Polaroid, Steps, Data Display) */
/* 7. Tables (Custom and Responsive) */
/* 8. Utility & Override Styles */
/* 9. Media Queries (General) */
/* 10. Floating tool bar footer */


/*********************************
 * 1. Base Styles & Typography
 *********************************/

body {
  font-family: Arial, Helvetica, sans-serif;
}

/* Base image style */
img {
  max-width: 100%;
  height: auto;
}

/* Base label style */
label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

/*********************************
 * 2. Layout & Structure
 *********************************/

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Shared container/row sizing */
.container, .row {
  width: 100%;
  padding: 0 5px;
  box-sizing: border-box;
}

/* --- Fixed Header/Button Bar --- */
#buttonContainer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  background-color: #f8f9fa;
  z-index: 1000;
}

#buttonContainer button {
  margin: 0 5px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  background-color: #fff;
  color: black;
  padding: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

/* --- Full-Width Background --- */
.full-width-background {
  width: 100%;
  background-color: #D5D8DC;
  padding: 10px 0;
  box-sizing: border-box;
}

/* --- Flexible Row Containers --- */
.row-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between items */
  padding: 5px;
}

.prompt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* General flex-row styling */
.flex-row {
  position: relative; /* This ensures children can be positioned relative to this container */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Styling for the text and image columns */
.col-text, .col-image {
  padding: 10px;
  flex-basis: 100%; /* Default to full width */
}

/* --- Popup --- */
#searchPopup {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  background-color: white;
  padding: 20px;
  border: 2px solid #000;
  box-shadow: 0px 0px 10px #000;
}


/*********************************
 * 3. General Content & Containers
 *********************************/

.general_content {
  max-width: 600px;
  margin: auto;
  padding: 20px;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  background-color: #ffffff;
}

.left-align-container {
  text-align: left;
  padding: 10px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: #f9f9f9;
  color: #333;
}

.center-align-container {
  text-align: center;
  padding: 10px;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  box-sizing: border-box;
  background-color: #f9f9f9;
  color: #333;
}

.form_container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #f9f9f9;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}

.content-enhanced-chat {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0;
  padding: 5px 0;
  color: white;
}


/*********************************
 * 4. Forms, Inputs, & Textareas
 *********************************/

/* Base text/password input styles */
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Email input style */
input[type="email"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Base textarea styles (overrides others below, so placed first) */
textarea {
  width: 200px;
  height: auto;
  min-height: 66px;
}

/* Specific textarea styles for form/input group elements */
input[type="email"], textarea { /* This applies to form-related textareas */
  margin-bottom: 15px;
}

/* Responsive Input (applies to text-like inputs) */
.responsive-input {
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}

/* Specific textarea used in prompt-row */
.prompt-row textarea {
  flex-grow: 1;
  width: auto;
  min-width: 250px;
  max-width: 600px;
  height: auto;
  min-height: 66px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Gray Textarea */
.gray_textarea {
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
  background-color: #f9f9f9;
}

/* Clipboard Textarea */
#textarea_clipboard {
  width: calc(100% - 20px);
  height: 132px;
  padding: 10px;
  border: 2px solid #4A90E2;
  border-radius: 4px;
  font-size: 1em;
  box-shadow: none;
  box-sizing: border-box;
  background-color: #E3F3F3;
  resize: none;
}

#textarea_clipboard:focus {
  border-color: #76baff;
  outline: none;
}

/* Responsive Dropdown */
select.responsive-select {
  width: 100%; /* Make it full width */
  max-width: 100%; /* Ensure it doesn't exceed the container's width */
  padding: 8px; /* Add padding for better look */
  border: 1px solid #ccc; /* Add border to match input fields */
  border-radius: 4px; /* Add border radius for consistent look */
  box-sizing: border-box; /* Ensure padding doesn't affect total width */
  font-size: 16px; /* Adjust font size */
  background-color: #fff; /* Match background color with the rest */
}

/* Input Group Container */
.input_group {
  margin-bottom: 20px;
}

/* Checkboxes */
.row-container input[type="checkbox"] {
  margin: 0;
}

/* Custom styled checkbox for prompt rows */
.prompt-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid #4A90E2;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  margin: 0;
  flex-shrink: 0;
  background-color: white;
  transition: all 0.2s ease;
}

.prompt-row input[type="checkbox"]:hover {
  border-color: #76baff;
  background-color: #f0f8ff;
}

.prompt-row input[type="checkbox"]:checked {
  background-color: #4A90E2;
  border-color: #4A90E2;
}

.prompt-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 18px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.prompt-row input[type="checkbox"]:focus {
  outline: 2px solid #76baff;
  outline-offset: 2px;
}

.large-checkbox {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.checkbox, .delete-prompt {
  /* Empty - appears to be a placeholder or for structural flexibility */
}

.clear-btn, .large-checkbox {
  flex: 0 0 auto;
}


/*********************************
 * 5. Buttons & Controls
 *********************************/

/* Base button style */
button {
  background-color: #e0e0e0;
  color: black;
  border: 1px solid #bbb;
  padding: 3px 10px;
  margin: 0 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 1s, border 1s, color 1s;
}

/* button:active (commented out in original) */
/* button:active {
  background-color: #0056b3;
  color: white;
  border-color: #004080;
  border-width: 3px;
  padding: 2px 9px;
}
*/

/* --- General Buttons --- */
.button {
  background-color: #04AA6D;
  border: none;
  color: white;
  padding: 16px 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  width: 300px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.button1 {
  background-color: white;
  color: black;
  border: 2px solid #04AA6D;
}

.button1:hover {
  background-color: #04AA6D;
  color: white;
}

/* --- Clear Button --- */
/* .clear-btn (commented out in original) */
/* .clear-btn {
  cursor: pointer;
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  color: #333;
  border-radius: 5px;
  outline: none;
}

.clear-btn:hover {
  background-color: #e8e8e8;
} */

.clear-btn:active {
  background-color: #ddd;
}

/* --- Save/Copy Buttons (Standalone) --- */
.saveButton, .copyButton {
  padding: 5px 15px;
  margin: 0 10px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

/* --- Feedback Button --- */
.feedback-button {
  width: 100%;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  margin: 4px 2px;
  box-sizing: border-box;
  transition-duration: 0.4s;
}

.feedback-button:hover {
  background-color: #45a049;
}

/* --- Help Button --- */
.help-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 2px 6px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.help-btn:hover {
  background-color: #0056b3;
}

/* --- Prompt Action Buttons (Dark/Themed) --- */
.prompt-action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* Slightly less gap */
  justify-content: center;
  background-color: #1e1e1e;
  padding: 8px;
  border-radius: 8px;
}

.prompt-action-btn {
  background-color: #333;
  color: #e0e0e0;
  border: 1px solid #444;
  padding: 4px 10px;  /* Further reduced height */
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;  /* Slightly smaller text */
  transition: all 0.3s ease;
  min-width: 100px; /* Keeps buttons uniform */
}

.prompt-action-btn:hover {
  background-color: #444;
  border-color: #5a5a5a;
  box-shadow: 0px 0px 5px rgba(100, 255, 100, 0.5);
}

/* --- Save Button (Themed) --- */
.save-btn {
  background-color: #82E0AA; /* Green background 82E0AA 4CAF50*/
  color: black;
  border: 1px solid #3a7d44;
  padding: 4px 10px;  /* Keep same height */
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
  min-width: 100px;
}

.save-btn:hover {
  background-color: #3e8e41; /* Darker green */
  border-color: #2d6233;
  box-shadow: 0px 0px 5px rgba(0, 255, 0, 0.5); /* Green glow */
}





/* Clipboard Container - removes extra spacing */
.container.clipboard-container {
  padding: 0 5px;
  margin-bottom: 20px;
}

/* Clipboard Textarea - integrated top design */
#textarea_clipboard {
  width: 100%;
  height: 132px;
  padding: 10px;
  border: 2px solid #4A90E2;
  border-radius: 6px 6px 0 0;  /* Rounded top corners only */
  border-bottom: none;  /* Remove bottom border to connect with button */
  font-size: 1em;
  box-shadow: none;
  box-sizing: border-box;
  background-color: #E3F3F3;
  resize: none;
  margin-bottom: 0;
}

#textarea_clipboard:focus {
  border-color: #76baff;
  outline: none;
  border-bottom: none;  /* Keep bottom borderless on focus */
}

/* Clipboard Copy Button - integrated bottom design */
.clipboard-copy-btn {
  width: 100%;
  margin: 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  border: 2px solid #4A90E2;
  border-top: none;  /* Remove top border to connect with textarea */
  border-radius: 0 0 6px 6px;  /* Rounded bottom corners only */
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  letter-spacing: 0.3px;
}

.clipboard-copy-btn:hover {
  background: linear-gradient(135deg, #357ABD 0%, #2868A6 100%);
  border-color: #357ABD;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.clipboard-copy-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
  background: linear-gradient(135deg, #2868A6 0%, #1f5287 100%);
}

/* Add a subtle separator line */
.clipboard-copy-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}





/*********************************
 * 6. Components
 *********************************/

/* --- Polaroid Card --- */
.polaroid {
  background-color: white;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  margin: 20px auto;
  border: 10px solid #fff;
  border-bottom: 40px solid #fff;
  text-align: center;
}

.polaroid img {
  width: 100%;
}

.container_polaroid {
  text-align: left;
  padding: 10px 20px;
}

.polaroid-background-image {
  background-image: url('./images/art_square1.png');
  background-size: cover;
  background-position: center;
}

/* --- Data Display List (DL/DT/DD) --- */
.data-display dl {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.data-display dt {
  flex-basis: 30%;
  font-weight: bold;
}

.data-display dd {
  flex-basis: 70%;
  margin: 0;
  padding: 0 0 10px 0;
}

.data-display dt, .data-display dd {
  margin-bottom: 10px;
}

/* --- Steps Container (Home Page Mock) --- */
.steps-container {
  display: flex;
  flex-wrap: nowrap; /* Ensure items are on a single row */
  justify-content: space-between;
  align-items: flex-start; /* Align items at the start */
  gap: 10px; /* Add some spacing between steps */
}

.step {
  flex: 1 1 22%; /* Adjust the percentage to fit your layout needs */
  margin: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step img {
  width: 100%;
  height: auto;
  max-height: 200px; /* Adjust as needed */
  margin-bottom: 10px; /* Add some space below the image */
}

.step p {
  margin: 0; /* Ensure no additional margin is added */
  padding-top: 10px; /* Space between image and text */
}

/* --- Help Text (Hidden) --- */
.help-text {
  display: none;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
  color: #333;
  font-size: 14px;
}

/* --- Image Overlay Text --- */
.overlay-text {
  position: absolute; /* Position the text absolutely over the image */
  top: 50%; /* Center vertically */
  left: 50%; /* Center horizontally */
  transform: translate(-50%, -50%); /* Adjust the text to be perfectly centered */
  color: white; /* Change the text color for visibility */
  font-size: 18px;
  background-color: rgba(0, 0, 0, 0.3); /* Optional: Adds a semi-transparent background for better visibility */
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  width: 80%; /* Make the text container 80% of the image width */
  max-width: 600px; /* Set a max-width to prevent it from becoming too wide */
}


/*********************************
 * 7. Tables (Custom and Responsive)
 *********************************/

table.custom-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

table.custom-table th, table.custom-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table.custom-table th {
  background-color: #f2f2f2;
  color: #333;
  font-weight: bold;
}

table.custom-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table.custom-table tr:hover {
  background-color: #f1f1f1;
}


/*********************************
 * 8. Utility & Override Styles
 *********************************/

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

.blue-bg {
  background-color: #dceefb;
}

.green-bg {
  background-color: #eaf4d7;
}

/* !!! Important Override !!! */
.exceed-limit {
  background-color: red !important;
  color: white !important;
}


/*********************************
 * 9. Media Queries (General)
 *********************************/

/* --- Media Query for Mobile/Small Screens (max-width: 600px) --- */
@media screen and (max-width: 600px) {
  /* Generic Table Responsiveness */
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  tr {
    border: 1px solid #ccc;
  }
  td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
  }
  td:before {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
  }

  /* Custom Table Responsiveness */
  table.custom-table, table.custom-table thead, table.custom-table tbody, table.custom-table th, table.custom-table td, table.custom-table tr {
    display: block;
  }
  table.custom-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  table.custom-table tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
  }
  table.custom-table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
    text-align: right;
  }
  table.custom-table td:before {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    text-align: left;
    font-weight: bold;
  }

  /* Polaroid Responsiveness */
  .polaroid {
    width: 300px;
  }

  /* Steps Container Responsiveness (up to 480px) */
  .step {
    flex: 1 1 100%;
  }

  /* Prompt Action Button Group Responsiveness */
  .prompt-action-btn-group {
    flex-direction: column;
    align-items: center;
  }

  .prompt-action-btn {
    width: 90%;
    max-width: 260px; /* Reduced width slightly */
    text-align: center;
  }
}

/* --- Media Query for Medium Screens (max-width: 768px) --- */
@media (max-width: 768px) {
  /* Steps Container Responsiveness (up to 768px) */
  .steps-container {
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
  }

  .step {
    flex: 1 1 45%;
  }
}

/* --- Media Query for Desktop/Large Screens (min-width: 601px) --- */
@media screen and (min-width: 601px) {
  /* Prompt Row Textarea Sizing */
  .prompt-row textarea {
    max-width: 600px;
    width: 600px;
  }

  /* Custom Table Border fix */
  table.custom-table {
    border: 1px solid black;
  }
  table.custom-table th, table.custom-table td {
    border: 1px solid black;
  }

  /* Polaroid Sizing */
  .polaroid {
    width: 600px;
  }
}

/* --- Media Query for Desktop/Large Screens (min-width: 768px) --- */
@media (min-width: 768px) {
  /* Flexible Row Layout */
  .col-text {
    flex-basis: 33.33%; /* Text column takes 1/3 width */
  }
  .col-image {
    flex-basis: 66.66%; /* Image column takes 2/3 width */
    position: relative; /* Ensure this is relative to position text over it */
    display: inline-block;
  }
}


/*********************************/
/* 10. Floating tool bar footer */
/*********************************/
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: auto;
  touch-action: manipulation;
}

.floating-btn {
  background-color: #0f172a;
  color: #e5e7eb;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.2s ease-in-out;
  pointer-events: auto;
  touch-action: manipulation;
}


.floating-btn:hover {
  background-color: #1e293b;
  transform: translateY(-2px);
}
