/**
 * @file    rfq-upload.css
 * @page    request-for-quotation.html
 * @desc    File upload component, drag-drop zone, file list, progress bars, auth modal variant.
 */

/* Additional CSS for file upload page */
/* Scoped CSS variables and styles specific to the file upload page */

option.bold-option {
  font-weight: bold;
}

body.file-upload-page {
  --primary-color: var(--color-primary);
  --hover-primary-color: var(--color-primary-hover);
  --background-color: #f3f5fa;
  --font-color: var(--color-primary-dark);
  --border-radius: 5px;
  --border-color: #ddd;
  font-family: "Open Sans", sans-serif;
  background: var(--background-color);
  color: var(--font-color);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  box-sizing: border-box;
}

body.file-upload-page .page-content {
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

body.file-upload-page .rfq-upload-container {
  padding: 20px;
  margin: 0 auto;  
  max-width: min(2000px, calc(100% - 40px)); 
  box-sizing: border-box;  
  border-radius: var(--border-radius);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  background: #fff;
}

body.file-upload-page .rfq-upload-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.file-upload-page .rfq-form-control {
  width: auto;
  min-width: 120px;
  max-width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

body.file-upload-page .rfq-file-input {
  display: none;
}

body.file-upload-page .rfq-file-label {
  display: inline-block;
  cursor: pointer;
  background: #EEE;
  color: var(--primary-color);
  padding: 10px 20px;
  border: 2px dashed var(--primary-color);
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  transition: background-color 0.3s;
}

body.file-upload-page .rfq-file-label.rfq-disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-color: #d1d5db;
  cursor: not-allowed;
  opacity: 0.7;
  pointer-events: none;
}

body.file-upload-page .file-label:hover {
  background-color: var(--hover-primary-color);
  color: #FFF;
}

body.file-upload-page .btn-get-started {
  padding: 10px 25px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: none;
  transition: background-color 0.3s;
}

body.file-upload-page .btn-get-started:disabled {
  background-color: #cbd5e1;
  color: #f8fafc;
  cursor: not-allowed;
  box-shadow: none;
}

body.file-upload-page .btn-get-started:hover {
  background-color: var(--hover-primary-color);
}

body.file-upload-page .rfq-table-responsive {
  width: 100%;
  max-width: 1980px;
  margin: 20px auto 0;
  overflow-x: auto;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.file-upload-page .rfq-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* Column sizing to accommodate long values on wide screens */
@media (min-width: 1440px) {
  body.file-upload-page .rfq-table th:nth-child(1),
  body.file-upload-page .rfq-table td:nth-child(1) { /* File Name */
    min-width: 260px;
    max-width: 360px;
  }

  body.file-upload-page .rfq-table th:nth-child(2),
  body.file-upload-page .rfq-table td:nth-child(2) { /* Technical drawings */
    min-width: 170px;
    max-width: 220px;
  }

  body.file-upload-page .rfq-table th:nth-child(3),
  body.file-upload-page .rfq-table td:nth-child(3) { /* Manufacturing Process */
    min-width: 260px;
    max-width: 340px;
  }

  body.file-upload-page .rfq-table th:nth-child(4),
  body.file-upload-page .rfq-table td:nth-child(4) { /* Material */
    min-width: 260px;
    max-width: 340px;
  }

  body.file-upload-page .rfq-table th:nth-child(5),
  body.file-upload-page .rfq-table td:nth-child(5) { /* Post-Processing */
    min-width: 260px;
    max-width: 340px;
  }

  body.file-upload-page .rfq-table th:nth-child(6),
  body.file-upload-page .rfq-table td:nth-child(6) { /* Color */
    min-width: 240px;
    max-width: 320px;
  }

  body.file-upload-page .rfq-table th:nth-child(7),
  body.file-upload-page .rfq-table td:nth-child(7) { /* Quantity */
    min-width: 120px;
    max-width: 140px;
  }

  body.file-upload-page .rfq-table th:nth-child(8),
  body.file-upload-page .rfq-table td:nth-child(8) { /* Alternative Quantity */
    width: 115px;
    min-width: 115px;
    max-width: 135px;
  }

  body.file-upload-page .rfq-table th:nth-child(9),
  body.file-upload-page .rfq-table td:nth-child(9) { /* Comments */
    width: 105px;
    min-width: 105px;
    max-width: 125px;
  }

  body.file-upload-page .rfq-table th:nth-child(10),
  body.file-upload-page .rfq-table td:nth-child(10) { /* Actions */
    width: 90px;
    min-width: 90px;
    max-width: 100px;
  }
}

body.file-upload-page .rfq-table thead {
  background-color: var(--color-primary-dark);
  color: white;
}

body.file-upload-page .rfq-table th {
  padding: 12px 8px;
  border-bottom: 2px solid #2a3f5f;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
  vertical-align: middle;
  color: white;
  white-space: normal;
  word-wrap: break-word;
}

body.file-upload-page .rfq-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
  word-wrap: break-word;
  vertical-align: middle;
  color: #444;
}

body.file-upload-page .rfq-table tbody tr {
  transition: background-color 0.2s ease;
}

body.file-upload-page .rfq-table tbody tr:hover {
  background-color: #f8f9fa;
}

body.file-upload-page .rfq-table th.manufacturing-method, 
body.file-upload-page .rfq-table td.manufacturing-method,
body.file-upload-page .rfq-table th.material, 
body.file-upload-page .rfq-table td.material,
body.file-upload-page .rfq-table th.finishing, 
body.file-upload-page .rfq-table td.finishing {
  min-width: 160px;
  max-width: 260px;
  overflow: hidden;
  white-space: normal;
  text-overflow: ellipsis;
}

/* Responsive table styles for different screen sizes */
@media (max-width: 1366px) {
  body.file-upload-page .rfq-table th {
    font-size: 0.8rem;
    padding: 10px 6px;
  }
  
  body.file-upload-page .rfq-table td {
    font-size: 0.85rem;
    padding: 8px 6px;
  }
}

@media (min-width: 1920px) {
  body.file-upload-page .rfq-table th {
    font-size: 0.95rem;
    padding: 14px 10px;
  }
  
  body.file-upload-page .rfq-table td {
    font-size: 1rem;
    padding: 12px 10px;
  }
}

/* Enhancing dropdown appearance within the file upload page */
body.file-upload-page select.form-control {
  width: 100%;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  background-color: white;
}

body.file-upload-page select.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

body.file-upload-page input.form-control {
  width: 100%;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

body.file-upload-page input.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}


/* Specific button styles within the file upload form */
body.file-upload-page .btn-get-started {
  padding: 10px 25px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  cursor: pointer;
  border: none;
  transition: background-color 0.3s;
}

/* Specific styles when dropdown is in warning or success state */
body.file-upload-page select.form-control.select-warning,
body.file-upload-page input.form-control.select-warning {
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
}

body.file-upload-page select.form-control.select-warning:focus,
body.file-upload-page input.form-control.select-warning:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

body.file-upload-page select.form-control.select-success,
body.file-upload-page input.form-control.select-success {
    background-color: #d4edda;
    border: 2px solid #28a745;
    border-radius: 6px;
}

body.file-upload-page select.form-control.select-success:focus,
body.file-upload-page input.form-control.select-success:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Warning state for empty/unselected required fields */
body.file-upload-page .select-warning::after {
    content: '';
}

body.file-upload-page .select-success::after {
    content: '';
}

body.file-upload-page .rfq-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

body.file-upload-page .rfq-modal-content {
  background-color: #fefefe;
  margin: 3% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease;
}

body.file-upload-page .rfq-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  margin-top: -10px;
  margin-right: -10px;
}

body.file-upload-page .rfq-close:hover,
body.file-upload-page .rfq-close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

body.file-upload-page textarea {
  width: 100%;
  height: 160px;
  padding: 12px 15px;
  box-sizing: border-box;
  border: 2px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  resize: vertical;
  font-size: 0.95rem;
}

body.file-upload-page textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

/* Comment modal title */
body.file-upload-page .rfq-modal-content h2 {
  color: var(--color-primary-dark);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

/* Comment modal actions */
body.file-upload-page .rfq-modal-content #saveComment {
  padding: 10px 24px;
  background-color: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

body.file-upload-page .rfq-modal-content #saveComment:hover {
  background-color: #31a9e1;
  box-shadow: 0 2px 6px var(--color-primary-30);
  transform: translateY(-1px);
}

/* Responsive adjustments for comment modal */
@media (max-width: 768px) {
  body.file-upload-page .rfq-modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 20px;
  }

  body.file-upload-page .rfq-modal-content h2 {
    font-size: 1.3rem;
  }
}

body.file-upload-page .btn {
  display: inline-block;
  padding: 8px 15px;
  margin: 4px;
  font-size: 14px;
  /* font-weight: bold; */
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
  border-radius: var(--border-radius); /* Utilize existing variable for border radius */
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body.file-upload-page .btn-info {
  color: #fff;
  background-color: var(--primary-color); /* Primary blue as used in other elements */
  border-color: var(--hover-primary-color);
}

body.file-upload-page .btn-info:hover {
  background-color: var(--hover-primary-color); /* Slightly darker blue on hover */
  border-color: darken(var(--hover-primary-color), 5%);
}

body.file-upload-page .btn-danger {
  color: #fff;
  background-color: #d9534f; /* Red */
  border-color: #d43f3a;
}

body.file-upload-page .btn-danger:hover {
  background-color: #c9302c;
  border-color: darken(#c9302c, 5%); /* Slightly darker red on hover */
}

body.file-upload-page .btn-success {
  color: #fff;
  background-color: #2ce322; 
  border-color: #086d19;
}

body.file-upload-page .btn-success:hover {
  background-color: #43bd06;
  border-color: darken(#43bd06, 5%); 
}

body.file-upload-page .btn-warning {
  color: #fff;
  background-color: #f0b133; 
  border-color: #eba71f;
}

body.file-upload-page .btn-warning:hover {
  background-color: #e09f1d;
  border-color: darken(#e09f1d, 5%); 
}

/* Optional: Adding focus styles for accessibility */
body.file-upload-page .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}


.custom-file-input {
  display: none;
}

.custom-file-label {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
  position: relative;
  text-align: center;
  width: 100%;
  padding: 18px; /* Match the padding of other elements */
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-file-label:hover {
  background-color: var(--hover-primary-color);
}

.custom-file-label::after {
  content: attr(data-text);
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-file-label.attached {
  color: #fff;
  background-color: #f0b133; 
  border-color: #eba71f;
}

/* Tooltip styles */
.file-tooltip {
  position: absolute;
  display: none;
  background: #000;
  color: #fff;
  padding: 5px;
  border-radius: var(--border-radius);
  /* pointer-events: none; */
  z-index: 1000;
  font-size: 12px;
}

/* ===== RFQ Floating Action Bar ===== */
#status-bar,
.rfq-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border-top: 2px solid #e2e8f0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
  padding: 16px 24px;
  z-index: 1000;
  animation: slideUpIn 0.3s ease-out;
}

@keyframes slideUpIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.rfq-action-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
}

/* Progress Checks - Visual indicators for completion status */
.rfq-progress-checks {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rfq-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  transition: all 0.3s ease;
}

.rfq-check-item i {
  font-size: 18px;
  transition: all 0.3s ease;
}

.rfq-check-item.completed {
  color: #22c55e;
}

.rfq-check-item.completed i::before {
  content: "\F26B"; /* Bootstrap Icons check-circle-fill */
}

.rfq-check-item.error {
  color: #ef4444;
}

.rfq-check-item.error i::before {
  content: "\F623"; /* Bootstrap Icons x-circle-fill */
}

/* Status Message Wrapper */
.rfq-status-message-wrapper {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

#status-message {
  margin: 0;
  padding: 10px 16px;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  display: inline-block;
}

#status-message:empty {
  display: none;
}

/* CTA Button Section */
.rfq-action-cta {
  flex-shrink: 0;
}

.rfq-continue-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a9fd1 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(71, 178, 228, 0.35);
}

.rfq-continue-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #2d4263 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(55, 81, 126, 0.4);
}

.rfq-continue-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(55, 81, 126, 0.3);
}

.rfq-continue-btn:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.rfq-continue-btn i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.rfq-continue-btn:hover:not(:disabled) i {
  transform: translateX(4px);
}

/* Pulse animation when button becomes enabled */
@keyframes pulseReady {
  0% {
    box-shadow: 0 4px 15px rgba(71, 178, 228, 0.35);
  }
  50% {
    box-shadow: 0 4px 25px rgba(71, 178, 228, 0.6);
  }
  100% {
    box-shadow: 0 4px 15px rgba(71, 178, 228, 0.35);
  }
}

.rfq-continue-btn.ready-pulse {
  animation: pulseReady 1.5s ease-in-out 3;
}

/* Legacy support for old .status-content */
.status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Success Message */
.success-message {
  color: #16a34a;
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  padding: 12px 20px;
  background: linear-gradient(to right, #dcfce7, #bbf7d0);
  border-radius: 8px;
  border: 1px solid #86efac;
  animation: fadeIn 0.5s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.success-message::before {
  content: "\F26B"; /* Bootstrap Icons check-circle-fill */
  font-family: "bootstrap-icons";
  font-size: 20px;
}

/* ===== Responsive Styles for RFQ Action Bar ===== */
@media (max-width: 992px) {
  .rfq-action-bar-container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .rfq-progress-checks {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .rfq-status-message-wrapper {
    order: -1;
    width: 100%;
  }
  
  .rfq-action-cta {
    width: 100%;
  }
  
  .rfq-continue-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .rfq-action-bar {
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  
  .rfq-progress-checks {
    display: none; /* Hide on very small screens to save space */
  }
  
  .rfq-continue-btn {
    padding: 14px 24px;
    font-size: 15px;
    min-height: 48px;
  }
  
  #status-message {
    font-size: 13px;
    padding: 8px 12px;
    word-break: break-word;
  }
  
  .rfq-status-message-wrapper {
    min-width: auto;
    width: 100%;
  }
}

.technical-drawing-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.technical-drawing-modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 5px;
  text-align: center;
}

.technical-drawing-modal-content h2 {
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}

.technical-drawing-modal-content p {
  margin-bottom: 20px;
  color: #444444;
}

.technical-drawing-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.technical-drawing-modal-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 50px;
  color: #fff;
  transition: 0.3s;
}

.technical-drawing-modal-buttons button:hover {
  background: var(--color-primary-hover);
}

/* Technical Drawing Modal - Mobile improvements */
@media (max-width: 576px) {
  .technical-drawing-modal-content {
    width: 92%;
    margin: 10% auto;
    padding: 20px 16px;
    border-radius: 12px;
  }
  
  .technical-drawing-modal-content h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
  
  .technical-drawing-modal-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
  }
  
  .technical-drawing-modal-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .technical-drawing-modal-buttons button {
    width: 100%;
    padding: 14px 20px;
    min-height: 48px;
  }
}

.custom-file-label.needs-reupload {
  background-color: #ffeeba;
  border-color: #ffc107;
  color: #856404;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* .upload-progress {
  margin-top: 12px;
  text-align: center;
}

.progress-bar {
  width: 100%;
  background-color: #e0e0e0;
  padding: 3px;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
}

.progress-bar .progress {
  display: block;
  height: 12px;
  background-color: var(--color-primary);
  border-radius: 3px;
  transition: width 500ms ease-in-out;
}

.progress-text {
  margin-top: 1px;
  font-size: 14px;
  color: var(--color-primary-dark);
} */


/* Overlay Styles */
.upload-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 2000; /* Ensure it sits above other elements */
}

/* Spinner Styles */
.upload-spinner {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid var(--primary-color); /* Blue */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

/* Enhanced Progress Bar Styles */
.enhanced-progress-bar {
  width: 80%;
  background-color: #e0e0e0;
  border-radius: 25px;
  overflow: hidden;
  margin-top: 10px;
}

.enhanced-progress-bar .progress-fill {
  height: 20px;
  width: 0%;
  background-color: var(--primary-color);
  border-radius: 25px 0 0 25px;
  transition: width 0.5s ease-in-out;
}

/* Progress Text Styles */
.enhanced-progress-text {
  color: #fff;
  font-size: 16px;
  margin-top: 10px;
}


@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.quantity-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.quantity-input {
  width: 100%;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.quantity-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

/* Hide spinner arrows from main quantity input */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

.quantity-input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Additional rules to ensure spinner arrows are hidden */
input[type="number"].quantity-input::-webkit-outer-spin-button,
input[type="number"].quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

input[type="number"].quantity-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.add-alternative-quantity {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 6px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.add-alternative-quantity:hover {
  background-color: #31a9e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px var(--color-primary-30);
}

.alternative-quantity-wrapper {
  position: relative;
  margin-top: 5px;
  width: 100%;
}

.alternative-quantity {
  width: 100%;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.alternative-quantity:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-10);
}

/* Hide spinner arrows from alternative quantity inputs */
.alternative-quantity::-webkit-outer-spin-button,
.alternative-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

.alternative-quantity[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Additional rules to ensure spinner arrows are hidden for alternative quantity */
input[type="number"].alternative-quantity::-webkit-outer-spin-button,
input[type="number"].alternative-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  display: none;
}

input[type="number"].alternative-quantity {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Comprehensive rule to hide all spinner arrows in the RFQ table */
body.file-upload-page .rfq-table input[type="number"]::-webkit-outer-spin-button,
body.file-upload-page .rfq-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
  display: none !important;
}

body.file-upload-page .rfq-table input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.remove-alternative-quantity {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #dc3545;
  color: white;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.2s ease;
  z-index: 1;
}

.remove-alternative-quantity:hover {
  background-color: #c82333;
  transform: translateY(-50%) scale(1.1);
}

.remove-alternative-quantity::before {
  content: '×';
  position: relative;
  top: -0.5px; /* Fine-tune vertical alignment */
}

/* Validation states for quantity inputs */
.quantity-input.select-warning,
.alternative-quantity.select-warning {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
}

.quantity-input.select-warning:focus,
.alternative-quantity.select-warning:focus {
  border-color: #ff9800;
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.quantity-input.select-success,
.alternative-quantity.select-success {
  background-color: #d4edda;
  border: 2px solid #28a745;
}

.quantity-input.select-success:focus,
.alternative-quantity.select-success:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Actions Cell Styling */
body.file-upload-page .actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px; /* Space between buttons */
  height: 100%; /* Ensure the cell takes full height */
}

/* Action Buttons Styling */
body.file-upload-page .action-button {
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* Ensure buttons occupy the full height of the cell */
body.file-upload-page .actions-cell .action-button {
  height: 100%;
}

/* Icon Styling within Buttons */
body.file-upload-page .action-button i {
  font-size: 16px;
}

/* Hover Effects for Buttons */
body.file-upload-page .action-button.btn-danger:hover {
  background-color: #c9302c;
}

body.file-upload-page .action-button.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

/* Disabled Technical Drawing Label Styling */
body.file-upload-page .custom-file-label.disabled {
  color: #6c757d; /* Bootstrap's secondary text color */
  background-color: #e9ecef !important; /* Light grey background */
  cursor: not-allowed; /* Change cursor */
  pointer-events: none; /* Disable interaction */
}


/* Auth Modal Styles */
.auth-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.auth-modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  text-align: center;
}

.auth-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#authForm input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

#authForm button {
  padding: 10px 20px;
  background-color: var(--color-primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

#authForm button:hover {
  background-color: var(--color-primary-hover);
}

#authSwitch {
  margin-top: 10px;
}

#authSwitch span {
  color: var(--color-primary);
  cursor: pointer;
}

/* Auth Modal - Mobile improvements */
@media (max-width: 576px) {
  .auth-modal-content {
    width: 92%;
    margin: 10% auto;
    padding: 20px 16px;
    border-radius: 12px;
  }
  
  #authForm input {
    padding: 14px 12px;
    font-size: 1rem;
    margin: 8px 0;
  }
  
  #authForm button {
    width: 100%;
    padding: 14px 20px;
    min-height: 48px;
    font-size: 1rem;
  }
  
  #authModalTitle {
    font-size: 1.3rem;
  }
  
  .auth-close {
    font-size: 32px;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
