/**
 * Modern frontend styles for Translation Order Manager
 * Inspired by professional translation service designs
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

.tom-modern-container {
  max-width: 100%;
  color: #333;
  background: #fff;
  min-height: 100vh;
  margin: 0 auto;
  margin-block: 20px;
}

/* Header */
.tom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tom-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tom-logo-icon {
  width: 40px;
  height: 40px;
  background: #3e3ed3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.tom-logo-text {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.tom-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tom-contact-btn {
  background: #3e3ed3;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

/* Main Content */
.tom-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Hero Section */
.tom-hero-section {
  text-align: center;
  margin-bottom: 60px;
}

.tom-hero-title {
  font-size: 48px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.2;
}

.tom-hero-subtitle {
  font-size: 20px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Form Container */
.tom-form-container {
  background: #fff;
  padding: 40px;
  margin-bottom: 40px;
}

/* Shortcode-only version (no full page layout) */
.tom-form-container:not(.tom-full-page) {
  margin-block: 20px;
  max-width: 100%;
}

/* When used as shortcode, ensure proper spacing */
.wp-block-translation-order-manager-order-form .tom-form-container,
.wp-block-translation-order-manager-order-tracking .tom-form-container {
  margin: 0;
}

/* Multi-step Form */
.tom-multi-step-form {
  position: relative;
}

.tom-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tom-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tom-step-header {
  text-align: center;
  margin-bottom: 40px;
}

.tom-step-header h2 {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.tom-step-header p {
  color: #666;
}

/* Form Grid */
.tom-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
  column-gap: 32px;
}

@media (min-width: 768px) {
  .tom-form-group {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .tom-form-group {
    margin-bottom: 10px;
  }
}

.tom-form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  font-size: 16px;
}

/* Select Wrapper */
.tom-select-wrapper {
  position: relative;
}

.tom-select-wrapper select {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e5e5;
  font-size: 16px;
  background: white;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.tom-select-wrapper select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tom-select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

/* Input Fields */
.tom-form-group input[type="text"],
.tom-form-group input[type="email"],
.tom-form-group input[type="tel"],
.tom-form-group input[type="number"],
.tom-form-group input[type="date"],
.tom-form-group textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e5e5e5;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.tom-form-group input:focus,
.tom-form-group textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Field Description */
.tom-field-description {
  margin: 6px 0 12px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

/* Word Count Wrapper */
.tom-word-count-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tom-word-count-wrapper input {
  flex: 1;
  width: 200px;
  min-width: 80px;
  max-width: 50%;
}

.tom-or-text {
  color: #666;
  font-weight: 500;
}

.tom-upload-btn {
  background: #f8f9fa;
  border: 2px dashed #ccc;
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #666;
  transition: all 0.2s ease;
}

.tom-upload-btn:hover {
  border-color: #007cba;
  color: #007cba;
}

.tom-upload-icon {
  font-size: 18px;
}

/* Count unit inline toggle */
.tom-count-toggle.tom-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e1e5e9;
  background: #f5f7fb;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
}

.tom-count-pill {
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
}

.tom-count-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tom-count-pill span {
  display: inline-block;
  padding: 10px 14px;
  color: #344054;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  background: transparent;
  transition: all 0.15s ease-in-out;
}

.tom-count-pill input:checked + span {
  background: #3e3ed3;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 124, 186, 0.25);
}

.tom-count-pill:hover span {
  opacity: 0.9;
}

/* Align segmented control visually with inputs */
.tom-word-count-wrapper .tom-count-toggle.tom-inline {
  height: 48px;
}
.tom-word-count-wrapper .tom-count-pill span {
  line-height: 24px;
}

@media (max-width: 768px) {
  .tom-word-count-wrapper .tom-count-toggle.tom-inline {
    justify-content: center;
    height: auto;
  }
  .tom-word-count-wrapper {
    gap: 10px;
  }
  .tom-upload-zone input[type="file"] {
    width: 100%;
  }
}

/* Translation Type Toggle */
.tom-translation-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.tom-type-pill {
  display: flex;
  align-items: stretch;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 0.2s ease-in-out;
}

.tom-type-pill input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tom-type-pill > span {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  width: 100%;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background: #ffffff;
  transition: all 0.2s ease-in-out;
  position: relative;
}

.tom-type-pill:hover > span {
  border-color: #3e3ed3;
  box-shadow: 0 2px 8px rgba(62, 62, 211, 0.1);
}

.tom-type-pill input:checked + span {
  border-color: #3e3ed3;
  background: #f8f8ff;
  box-shadow: 0 2px 12px rgba(62, 62, 211, 0.15);
}

.tom-type-pill input:checked + span::before {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: #3e3ed3;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

.tom-type-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.tom-type-desc {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  line-height: 1.4;
}
.tom-type-link {
    span {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
  .tom-translation-type-toggle {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Notary Toggle */
.tom-notary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid #e1e5e9;
  background: #f5f7fb;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
  margin-top: 8px;
}

.tom-notary-option {
  display: inline-flex;
  align-items: center;
  user-select: none;
  cursor: pointer;
}

.tom-notary-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tom-notary-option span {
  display: inline-block;
  padding: 10px 24px;
  color: #344054;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  background: transparent;
  transition: all 0.15s ease-in-out;
  min-width: 60px;
  text-align: center;
}

.tom-notary-option input:checked + span {
  background: #3e3ed3;
  color: #fff;
  box-shadow: 0 2px 6px rgba(62, 62, 211, 0.25);
}

.tom-notary-option:hover span {
  opacity: 0.9;
}

/* Date Wrapper */
.tom-date-wrapper {
  position: relative;
  max-width: 300px;
}

.tom-date-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

/* Service Options */
.tom-service-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.tom-service-card {
  background: white;
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  padding: 30px;
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%; /* Ensure equal height cards */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tom-service-card.selected {
  border-color: #007cba;
  background: #f8fcff;
}

.tom-best-seller {
  border-color: #28a745;
}

.tom-best-seller-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
}

.tom-service-header {
  text-align: center;
  margin-bottom: 20px;
}

.tom-service-header h4 {
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.tom-service-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tom-price-amount {
  font-size: 24px;
  font-weight: 700;
  color: #007cba;
}

.tom-price-per-word {
  font-size: 14px;
  color: #666;
}

.tom-price-per-page {
  font-size: 14px;
  color: #666;
}

.tom-notary-fee {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  margin-top: 4px;
  display: none;
  color: #007cba;
}

.tom-service-features {
  margin-bottom: 20px;
}

.tom-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}

.tom-feature-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.tom-service-delivery {
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.tom-delivery-text {
  display: block;
  margin-bottom: 4px;
}

.tom-delivery-date {
  font-weight: 600;
  color: #333;
}

.tom-service-select-btn {
  width: 100%;
  background: #3e3ed3;
  color: white;
  border: none;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tom-service-card.selected .tom-service-select-btn {
  background: #28a745;
}

/* Disabled/hidden service card states */
.tom-service-card.disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
  cursor: not-allowed;
}
.tom-service-card.disabled:hover {
  transform: none;
  box-shadow: none;
  border-color: #e5e5e5;
}
.tom-service-card.disabled .tom-service-select-btn {
  background: #ccc;
  cursor: not-allowed;
}
.tom-service-card.hidden {
  display: none !important;
}

.tom-service-select-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Capacity warning */
.tom-service-capacity-warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
  padding: 12px 16px;
  border-radius: 8px;
}

/* Unavailable overlay */
.tom-card-unavailable {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #6c757d;
  text-transform: uppercase;
  pointer-events: none;
}

/* Form Layout */
.tom-form-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}

.tom-form-main {
  background: white;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

/* Order Summary */
.tom-order-summary {
  background-color: rgba(62, 62, 211, 0.05);
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 30px;
  position: sticky;
  top: 120px;
}

.tom-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e5e5;
}

.tom-summary-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.tom-edit-btn {
  display: none; /* Edit buttons removed — keep rule to avoid flashes if cached markup appears */
}

.tom-summary-content {
  margin-bottom: 20px;
}

.tom-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.tom-summary-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tom-summary-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  margin-top: 2px;
}

.tom-summary-details {
  flex: 1;
}

.tom-summary-label {
  display: block;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 2px;
}

.tom-summary-value {
  display: block;
  font-size: 16px;
  color: #333;
  font-weight: 700;
}

.tom-summary-total {
  border-top: 2px solid #e5e5e5;
  padding-top: 20px;
}

.tom-total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.tom-total-final {
  font-weight: 700;
  font-size: 18px;
  color: #333;
  margin-top: 12px;
}

#summary-notary-line {
  display: none;
  font-size: 14px;
  color: #666;
}

/* Radio Options */
.tom-file-options,
.tom-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tom-radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.tom-radio-option:hover {
  background: #f8f9fa;
}

.tom-radio-option input[type="radio"] {
  display: none;
}

.tom-radio-custom {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
  vertical-align: middle;
}

.tom-radio-option input[type="radio"]:checked + .tom-radio-custom {
  border-color: #007cba;
  background: #3e3ed3;
}

.tom-radio-option input[type="radio"]:checked + .tom-radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

.tom-radio-text {
  font-size: 16px;
  color: #333;
}

/* Checkbox */
.tom-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.tom-checkbox-option input[type="checkbox"] {
  display: none;
}

.tom-checkbox-custom {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
  vertical-align: top;
}

.tom-checkbox-option input[type="checkbox"]:checked + .tom-checkbox-custom {
  border-color: #007cba;
  background: #3e3ed3;
}

.tom-checkbox-option
  input[type="checkbox"]:checked
  + .tom-checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.tom-checkbox-option:hover .tom-checkbox-custom {
  border-color: #007cba;
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.tom-checkbox-option input[type="checkbox"]:focus + .tom-checkbox-custom {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.tom-checkbox-text {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

.tom-required {
  color: #dc3545;
  font-weight: bold;
  margin-left: 2px;
}

/* Checkbox error state */
.tom-checkbox-option.tom-field-error .tom-checkbox-custom {
  border-color: #dc3545;
  background-color: #f8d7da;
}

.tom-checkbox-option.tom-field-error .tom-checkbox-text {
  color: #dc3545;
}

.tom-checkbox-option.tom-field-error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* File Upload Area */
.tom-file-upload-area {
  margin-top: 20px;
}

.tom-upload-zone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.tom-upload-zone:hover {
  border-color: #007cba;
  background: #f8fcff;
}

.tom-upload-zone input[type="file"] {
  opacity: 0;
  cursor: pointer;
}

/* Privacy Note */
.tom-privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.tom-lock-icon {
  font-size: 16px;
}

/* Step Actions */
.tom-step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e5e5e5;
}

/* Buttons */
.tom-btn {
  padding: 16px 32px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.tom-btn-primary {
  background: #3e3ed3;
  color: white;
}

.tom-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.tom-btn-secondary {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #e5e5e5;
}

.tom-btn-secondary:hover {
  background: #e9ecef;
  border-color: #ccc;
}

/* Progress Indicator */
.tom-progress-indicator {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e5e5;
  padding: 20px;
  z-index: 1000;
}

.tom-progress-bar {
  height: 4px;
  background: #e5e5e5;
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.tom-progress-fill {
  height: 100%;
  background: #3e3ed3;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.tom-progress-steps {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.tom-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.tom-progress-step.active {
  opacity: 1;
}

.tom-progress-step.completed {
  opacity: 1;
}

.tom-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e5e5;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.tom-progress-step.active .tom-step-number {
  background: #3e3ed3;
  color: white;
}

.tom-progress-step.completed .tom-step-number {
  background: #28a745;
  color: white;
}

.tom-step-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Payment Info */
.tom-payment-info {
  text-align: center;
  margin-bottom: 40px;
}

.tom-payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d4edda;
  color: #155724;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tom-payment-icon {
  font-size: 16px;
}

.tom-payment-text {
  font-size: 14px;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

/* Complex Needs */
.tom-complex-needs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: #f8f9fa;
  padding: 40px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.tom-complex-content {
  display: flex;
  gap: 30px;
  align-items: center;
}

.tom-complex-text h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.tom-complex-text p {
  font-size: 16px;
  color: #666;
  margin: 0;
}

.tom-complex-contact {
  display: flex;
  align-items: center;
  gap: 15px;
}

.tom-contact-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tom-person-avatar {
  width: 50px;
  height: 50px;
  background: #3e3ed3;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.tom-person-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.tom-contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tom-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.tom-contact-icon {
  font-size: 16px;
}

.tom-contact-link {
  color: #007cba;
  text-decoration: none;
}

.tom-contact-link:hover {
  text-decoration: underline;
}

/* Links */
.tom-link {
  color: #007cba;
  text-decoration: none;
}

.tom-link:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .tom-form-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .tom-order-summary {
    position: static;
  }

  .tom-complex-needs {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tom-complex-content {
    flex-direction: column;
    text-align: center;
  }

  .tom-service-options {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .tom-header {
    padding: 15px 20px;
  }

  .tom-main-content {
    padding: 20px 15px;
  }

  .tom-hero-title {
    font-size: 36px;
  }

  .tom-hero-subtitle {
    font-size: 18px;
  }

  .tom-form-container {
    padding: 0;
  }

  /* Form Layout Mobile Adjustments */
  .tom-form-layout {
    padding: 0;
  }

  .tom-form-main {
    padding: 20px 15px;
    border-radius: 8px;
  }

  /* Order Summary Mobile Adjustments */
  .tom-order-summary {
    border-radius: 8px;
    position: relative;
    top: 0;
  }

  .tom-summary-header {
    padding-bottom: 12px;
    margin-bottom: 15px;
  }

  .tom-summary-header h3 {
    font-size: 16px;
  }

  .tom-summary-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    gap: 8px;
  }

  .tom-summary-icon {
    font-size: 14px;
    width: 16px;
  }

  .tom-summary-label {
    font-size: 11px;
    margin-bottom: 1px;
  }

  .tom-summary-value {
    font-size: 13px;
  }

  .tom-total-line {
    font-size: 13px;
  }

  .tom-total-final {
    font-size: 16px;
  }

  .tom-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 30px;
  }

  .tom-service-options {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 10px;
  }

  label.tom-count-pill {
    margin-bottom: 0;
  }

  .tom-word-count-wrapper {
    padding-bottom: 30px;
  }

  /* Mobile service card adjustments */
  .tom-service-card {
    padding: 20px;
  }

  .tom-price-amount {
    font-size: 20px;
    line-height: 1.1;
  }

  .tom-feature {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .tom-service-select-btn {
    padding: 12px 16px;
    font-size: 15px;
  }

  .tom-price-per-word {
    font-size: 12px;
  }

  .tom-step-actions {
    flex-direction: column;
    gap: 15px;
  }

  .tom-btn {
    width: 100%;
  }

  .tom-progress-steps {
    gap: 20px;
  }

  .tom-step-label {
    display: none;
  }
}

/* Error Messages */
.tom-errors {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid #dc3545;
}

.tom-error {
  margin: 0;
  padding: 5px 0;
}

/* Success Messages */
.tom-success {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  border-left: 4px solid #28a745;
}

.tom-success-message {
  margin: 0;
  padding: 5px 0;
}

/* File Upload States */
.tom-upload-btn.file-selected {
  background: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.tom-upload-zone.file-selected {
  border-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.tom-upload-zone.file-selected p {
  color: #155724;
  font-weight: 600;
}

/* File List Styles */
.tom-file-list {
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
}

.tom-file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 14px;
}

.tom-file-item:last-child {
  margin-bottom: 0;
}

.tom-file-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tom-file-name {
  flex: 1;
  font-weight: 500;
  color: #333;
  word-break: break-word;
}

.tom-file-size {
  color: #666;
  font-size: 12px;
  flex-shrink: 0;
}

.tom-file-item .tom-remove-file {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 3px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
}

.tom-file-item .tom-remove-file:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

/* Delivery Options */
.tom-delivery-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.tom-delivery-option {
  position: relative;
}

.tom-delivery-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tom-delivery-label {
  display: block;
  padding: 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  position: relative;
  padding-left: 50px;
}

.tom-delivery-label::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 50%;
  background: white;
  transition: all 0.2s ease;
}

.tom-delivery-option input[type="radio"]:checked + .tom-delivery-label::before {
  border-color: #007cba;
  background: #3e3ed3;
}

.tom-delivery-option input[type="radio"]:checked + .tom-delivery-label::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.tom-delivery-option input[type="radio"]:focus + .tom-delivery-label {
  outline: 2px solid #007cba;
  outline-offset: 2px;
}

.tom-delivery-option input[type="radio"]:focus + .tom-delivery-label::before {
  box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.tom-delivery-option input[type="radio"]:checked + .tom-delivery-label {
  border-color: #007cba;
  background: #f0f8ff;
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.tom-delivery-option:hover .tom-delivery-label {
  border-color: #007cba;
  box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.tom-delivery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.tom-delivery-title {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.tom-delivery-date {
  background: #3e3ed3;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.tom-delivery-option
  input[type="radio"]:checked
  + .tom-delivery-label
  .tom-delivery-date {
  background: #0056b3;
}

.tom-delivery-description {
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}
