:root {
  --eat-primary: #ff7300;
  --eat-primary-darker: #e66900;
  --eat-complementary: #3a7b8c; /* Soft teal-blue complement */
  --eat-complementary-light: #e8f3f5; /* Very light teal for backgrounds */
  --eat-text-dark: #1a1a1a;
  --eat-text-light: #6c757d;
  --eat-bg-light: #fafafa;
  --eat-border-color: #e0e0e0;
  --eat-white: #ffffff;
  --eat-grey: #f0f0f0;
  --eat-footer-bg: #1a1a1a;
  --eat-success: #28a745;
  --eat-error: #dc3545;
}

/* Mobile First Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--eat-bg-light); /* Lighter background */
  color: var(--eat-text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.tf-container {
  max-width: 1200px; /* Keep max-width for larger screens */
  margin: 0 auto;
  padding: 0 15px; /* Consistent padding */
  width: 100%;
  box-sizing: border-box;
}

/* General Button Styling */
button,
.action-button {
  background-color: var(--eat-primary);
  color: var(--eat-white);
  border: none;
  padding: 10px 20px;
  border-radius: 8px; /* Rounded buttons */
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block; /* Ensure buttons behave predictably */
  text-align: center;
}

button:hover,
.action-button:hover {
  background-color: var(--eat-primary-darker);
  transform: translateY(-1px);
}

button:active,
.action-button:active {
  transform: translateY(0);
}

.action-button.pause-button {
  background-color: var(--eat-complementary);
}
.action-button.pause-button:hover {
  background-color: #326b7a; /* Darker teal */
}

.action-button.cancel-button {
  background-color: var(--eat-error);
}
.action-button.cancel-button:hover {
  background-color: #c82333; /* Darker red */
}

h1, h2, h3 {
  color: var(--eat-text-dark);
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

a {
  color: var(--eat-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--eat-primary-darker);
}

/* Header */
.header {
  background-color: var(--eat-white);
  border-bottom: 1px solid var(--eat-border-color);
  padding: 10px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping on very small screens */
}

.header-left .logo-site img {
  max-height: 40px; /* Slightly smaller logo */
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px; /* Space between title and button */
}

.header-right h1 {
  font-size: 1.3rem; /* Smaller title for mobile */
  margin: 0;
  color: var(--eat-text-dark);
  font-weight: 600;
  border: none; /* Remove previous styling */
  text-shadow: none;
  padding-bottom: 0;
}

#logout-button {
  padding: 8px 16px; /* Smaller logout button */
  font-size: 0.9rem;
}

/* Main Content Area */
main {
  padding: 20px 0; /* Vertical padding */
}

#subscriptions h2 {
  margin-bottom: 1.5rem;
  color: var(--eat-text-dark);
  border-bottom: 2px solid var(--eat-primary);
  padding-bottom: 8px;
  display: inline-block;
}

/* Subscription Card */
.subscription {
  background: var(--eat-white);
  border-radius: 12px; /* More rounded corners */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
  padding: 15px;
  margin-bottom: 25px;
}

.subscription h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column; /* Stack elements vertically */
  gap: 15px; /* Increased gap */
  border-bottom: 1px solid var(--eat-border-color);
  padding-bottom: 15px; /* Increased padding */
}

.subscription-header-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Info pills */
.next-delivery {
  background-color: var(--eat-grey);
  color: var(--eat-text-light);
  border: 1px solid var(--eat-border-color);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

.meal-count {
  background-color: rgba(255, 115, 0, 0.15);
  color: var(--eat-primary-darker);
  border: 1px solid var(--eat-primary);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

.subscription h3 .action-button {
  width: 100%; /* Full width buttons on mobile */
  box-sizing: border-box; /* Include padding in width */
  margin-left: 0 !important; /* Override inline styles */
  margin-top: 0;
}

/* Address and Email Info */
.shipping-address,
.billing-email {
  font-size: 0.95rem;
  color: var(--eat-text-light);
  margin: 5px 0 15px 0; /* Spacing */
  font-style: normal; /* Remove italics */
  word-break: break-word; /* Prevent overflow */
}

.shipping-address strong,
.billing-email strong {
  color: var(--eat-text-dark);
  font-weight: 500;
}

/* Responsive Table */
.table-responsive-container {
  overflow-x: auto; /* Enable horizontal scroll */
  margin-top: 15px;
}

table.table {
  width: 100%;
  border-collapse: collapse;
  white-space: normal; /* Allow wrapping on all screen sizes */
  font-size: 0.9rem;
}

table th,
table td {
  padding: 10px 12px;
  border: none; /* Remove internal borders */
  text-align: left;
  vertical-align: middle;
}

table th {
  background-color: var(--eat-grey);
  color: var(--eat-text-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--eat-border-color);
}

table tbody tr:nth-child(even) {
  background-color: #f7f7f7; /* Subtle striping */
}

table tbody tr:hover {
  background-color: #f1f1f1; /* Hover effect */
}

table td img {
  width: 80px; /* Smaller images */
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block; /* Prevent extra space below image */
}

table td:nth-child(1), /* Image */
table th:nth-child(1) {
  width: 100px; /* Fixed width for image column */
}

table td:nth-child(3), /* Quantity */
table th:nth-child(3) {
  text-align: center;
  width: 80px; /* Fixed width for quantity */
}

/* Support and Cancellation Sections */
.support-section,
.cancellation-section {
  background-color: var(--eat-grey);
  padding: 25px 0;
  margin-top: 30px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.support-section h2,
.cancellation-section h2 { /* If cancellation adds a heading */
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.support-section p,
.cancellation-section p {
  font-size: 1rem;
  color: var(--eat-text-light);
  margin-bottom: 10px;
  line-height: 1.5;
}

.support-section a,
.cancellation-section a {
  font-weight: 600;
  /* Inherit color from rule above */
}

/* Footer */
.footer {
  background: var(--eat-footer-bg);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0 20px;
  margin-top: 40px;
  font-size: 0.9rem;
}

.footer-top {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column; /* Stack on mobile */
  align-items: center;
  text-align: center;
  gap: 15px;
}

.footer .logo img {
  max-height: 60px;
  border-radius: 8px;
}

.footer-center p {
  color: var(--eat-primary); /* Use brand color */
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.footer-inner {
  padding: 20px 0;
}

.footer-inner-wrap {
  margin-bottom: 30px;
}

.footer-title {
  color: var(--eat-white);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer .contact-list li,
.footer .link-list li {
  margin-bottom: 10px;
}

.footer .contact-list li {
  display: flex;
  align-items: flex-start; /* Align icon top */
  gap: 10px;
}

.footer .contact-list li i {
  color: var(--eat-primary);
  margin-top: 3px; /* Align icon better */
  width: 16px;
  text-align: center;
}

.footer .link-list a {
  color: rgba(255, 255, 255, 0.7);
}

.footer .link-list a:hover {
  color: var(--eat-primary);
}

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom .no-copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

/* --- Desktop Styles --- */
@media (min-width: 768px) {
  .tf-container {
    padding: 0 30px; /* More padding on desktop */
  }

  /* Header */
  .header-right h1 {
    font-size: 1.8rem; /* Larger title */
  }

  /* Subscription Card */
  .subscription {
    padding: 25px;
  }

  .subscription h3 {
    flex-direction: row; /* Horizontal layout */
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
  }

  .subscription h3 .action-button {
    width: auto; /* Auto width for buttons */
    margin-top: 0;
  }

  .subscription-header-info {
      display: flex;
      flex-direction: column; /* Keep info stacked */
      align-items: flex-start;
      gap: 5px;
  }

  .subscription-header-actions {
      display: flex;
      gap: 10px; /* Space between buttons */
      flex-shrink: 0; /* Prevent buttons shrinking */
  }

  /* Table */
  table.table {
    white-space: nowrap; /* Prevent wrapping on desktop now that we have space */
    font-size: 1rem; /* Slightly larger font */
  }
  table th, table td {
    padding: 12px 15px;
  }
  table td img {
    width: 100px;
    height: 75px;
  }
  table td:nth-child(1), table th:nth-child(1) { width: 120px; }
  table td:nth-child(3), table th:nth-child(3) { text-align: center; width: 100px; }

  /* Support/Cancellation */
  .support-section,
  .cancellation-section {
    padding: 40px 0;
  }
  .support-section h2 { font-size: 1.5rem; }
  .support-section p, .cancellation-section p { font-size: 1.1rem; }

  /* Footer */
  .footer-top {
    flex-direction: row; /* Horizontal layout */
    justify-content: space-between;
    text-align: left;
  }
  .footer-inner .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px; /* Gutter */
  }
  .footer-inner .col-lg-3 {
    width: 25%; /* 4 columns */
    padding: 0 15px;
    box-sizing: border-box;
  }
}

/* Remove old styles no longer needed */
/* (Removed .header-left, .header-right flex:1, specific gradients, etc.) */
/* (Removed specific font styles now handled by body or element styles) */
/* (Removed meal-card styles as they weren't used in the provided HTML) */
/* (Removed fixed background attachment for support section) */

/* Ensure Bootstrap styles don't override too much (if still needed) */
.table-bordered { border: none; } /* Override bootstrap border */
.table-striped tbody tr:nth-child(odd) { background-color: transparent; } /* Use our striping */
.table-hover tbody tr:hover { background-color: #f1f1f1; } /* Keep hover */

.billing-details-container {
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.billing-details-container h4 {
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.discount-week {
  background-color: #e8f5e9; /* A light green color */
}

.discount-week td {
    color: #2e7d32; /* A darker green color for text */
}

#order-history h2 {
  margin-bottom: 1.5rem;
  color: var(--eat-text-dark);
  border-bottom: 2px solid var(--eat-primary);
  padding-bottom: 8px;
  display: inline-block;
}

/* Shipping Tracker Styles */
#shipping-tracker {
  background: linear-gradient(135deg, var(--eat-complementary-light), #e0f7fa);
  border-radius: 12px;
  margin-bottom: 25px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid var(--eat-complementary);
}

.shipping-tracker-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap; /* for smaller screens */
}

#shipping-tracker .fa-truck-fast {
  font-size: 3rem;
  color: var(--eat-complementary);
}

.shipping-tracker-text {
  flex-grow: 1;
}

.shipping-tracker-text h3 {
  margin: 0 0 5px 0;
  font-size: 1.3rem;
  color: var(--eat-text-dark);
}

.shipping-tracker-text p {
  margin: 0;
  color: var(--eat-text-light);
}

#shipping-tracker .track-button {
  background-color: var(--eat-complementary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-shrink: 0; /* prevent button from shrinking */
}

#shipping-tracker .track-button:hover {
  background-color: #326b7a; /* Darker teal */
  transform: translateY(-2px) scale(1.02);
}

/* Responsive adjustments for the tracker */
@media (max-width: 767px) {
  /* -- Responsive Tracker -- */
  .shipping-tracker-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .shipping-tracker-text h3 {
    font-size: 1.2rem;
  }

  /* == MEALS TABLE (CARD LAYOUT) == */
  .table-responsive-container {
    border: none;
    overflow-x: hidden;
  }
  
  .table-responsive-container table.table thead {
    display: none;
  }

  .table-responsive-container table.table, 
  .table-responsive-container table.table tbody, 
  .table-responsive-container table.table tr, 
  .table-responsive-container table.table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .table-responsive-container table.table tr {
    margin-bottom: 15px;
    border: 1px solid var(--eat-border-color);
    border-radius: 8px;
    background: var(--eat-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 10px;
  }

  .table-responsive-container table.table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--eat-grey);
  }
  
  .table-responsive-container table.table td:last-child {
    border-bottom: none;
  }

  .table-responsive-container table.table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--eat-text-dark);
    text-align: left;
    padding-right: 15px;
    flex-shrink: 0;
  }

  .table-responsive-container table.table td[data-label="Meal"] > span {
    text-align: right;
    word-break: break-word;
    min-width: 0; /* Allow flex item to shrink */
  }

  .table-responsive-container table.table td[data-label="Image"] {
    padding: 0;
    margin-bottom: 10px;
    border-bottom: none;
  }

  .table-responsive-container table.table td[data-label="Image"]::before {
    display: none;
  }

  .table-responsive-container table.table td[data-label="Image"] img {
    width: 100%;
    height: auto;
    max-width: 300px;
    margin: 0 auto;
    border-radius: 6px;
    display: block;
  }

  /* == BILLING TABLE (CARD LAYOUT) == */
  .billing-details-container {
    background-color: transparent;
    border: none;
    padding: 0;
    margin-top: 25px;
  }

  .billing-details-container h4 {
    text-align: center;
    margin-bottom: 15px;
  }

  .billing-details-container table.table thead {
    display: none;
  }
  
  .billing-details-container table.table, 
  .billing-details-container table.table tbody, 
  .billing-details-container table.table tr, 
  .billing-details-container table.table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .billing-details-container table.table tr {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 8px;
    background: var(--eat-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border: 1px solid transparent;
  }
  
  .billing-details-container tr.discount-week {
    border-left: 4px solid var(--eat-success);
    background-color: #f4fbf7;
  }

  .billing-details-container table.table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    text-align: right;
    border-bottom: 1px solid var(--eat-grey);
  }

  .billing-details-container table.table td:last-of-type {
    border-bottom: none;
  }
  
  .billing-details-container table.table td::before {
    content: attr(data-label);
    text-align: left;
    font-weight: normal;
    color: var(--eat-text-light);
    padding-right: 15px;
  }

  .billing-details-container table.table td[data-label="Date"] {
    justify-content: center;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--eat-text-dark);
    padding-bottom: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--eat-grey);
  }
  
  .billing-details-container table.table td[data-label="Date"]::before {
    display: none;
  }
  
  .billing-details-container table.table td[data-label="Total"] {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--eat-text-dark);
  }
}

.status-text {
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
  display: inline-block;
  border: 1px solid;
}
.status-paused {
  background-color: #fff3e0;
  color: #ff9800;
  border-color: #ff9800;
}
.status-cancelled {
  background-color: #ffebee;
  color: #f44336;
  border-color: #f44336;
}

/* Password Requirements Styling */
.password-requirements {
    list-style: none;
    padding: 10px 15px;
    margin: -10px 0 18px 0;
    font-size: 0.85rem;
    color: #555;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}

.password-requirements li {
    margin-bottom: 4px;
    padding-left: 20px;
    position: relative;
    transition: color 0.2s ease;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ff7300;
    font-weight: bold;
    transition: all 0.2s ease;
}

.password-requirements li.valid {
    color: #27ae60;
}

.password-requirements li.valid::before {
    content: '✔';
    color: #27ae60;
}

.hidden {
    display: none;
}

.header-right button:hover {
    background-color: #e65a00;
}

#change-password-button {
    color: #ff7300;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    margin-left: 10px;
    background-color: transparent;
    padding: 10px 0; /* Adjust padding to align with button */
}

#change-password-button:hover {
    text-decoration: underline;
} 