/* Cooking Time Calculator Styles */
/* Following Marinador Design System */

/* Tool Page Layout */
.tool-page {
  padding-top: 80px;
}

.tool-hero {
  padding: clamp(32px, 6vw, 56px) 0;
}

.tool-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .tool-inner {
    padding: 0 24px;
  }
}

/* Tool Header */
.tool-header {
  text-align: center;
  margin-bottom: 32px;
}

.tool-header h1 {
  font-size: clamp(28px, 4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 700;
}

.tool-lede {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

/* Calculator Tool Container */
.calculator-tool {
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-raised);
  display: grid;
  gap: 24px;
}

/* Input Groups */
.input-group {
  display: grid;
  gap: 8px;
}

.input-label {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--espresso);
  display: block;
}

.input-help {
  font-size: 12px;
  font-weight: 500;
  color: var(--espresso);
  margin: 4px 0 0;
}

/* Thickness Input */
.thickness-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.thickness-input-wrapper {
  flex: 1;
  position: relative;
}

.thickness-input-wrapper input {
  width: 100%;
  height: 48px;
  padding: 0 60px 0 16px;
  border: 1px solid var(--cream);
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  transition: border-color var(--dur-state) var(--ease-out);
}

.thickness-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-suffix {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--espresso);
  pointer-events: none;
}

/* Unit Toggle */
.unit-toggle {
  display: flex;
  gap: 4px;
  background: var(--cream);
  padding: 4px;
  border-radius: 8px;
}

.unit-option {
  display: block;
  cursor: pointer;
}

.unit-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.unit-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--espresso);
  transition: background var(--dur-state) var(--ease-out), color var(--dur-state) var(--ease-out);
}

.unit-option input:checked + span {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-raised);
}

.unit-option input:focus-visible + span {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Cooking Method Grid */
.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.method-option {
  display: block;
  cursor: pointer;
}

.method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 8px;
  border: 1px solid var(--cream);
  background: #fff;
  transition: background var(--dur-state) var(--ease-out),
              border-color var(--dur-state) var(--ease-out),
              color var(--dur-state) var(--ease-out);
  min-height: 80px;
}

.method-option input:checked + .method-card {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.method-option input:focus-visible + .method-card {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.method-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.method-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.method-sublabel {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1;
  min-height: 14px;
}

/* Starting Temperature Toggle */
.temp-toggle {
  display: flex;
  gap: 8px;
}

.temp-option {
  display: block;
  cursor: pointer;
  flex: 1;
}

.temp-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.temp-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--cream);
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background var(--dur-state) var(--ease-out),
              border-color var(--dur-state) var(--ease-out),
              color var(--dur-state) var(--ease-out);
}

.temp-option input:checked + span {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.temp-option input:focus-visible + span {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Warning Banner */
.warning-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--cream);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  margin-top: 24px;
}

.warning-banner.hidden {
  display: none;
}

.warning-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.warning-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Results Section */
.results-section {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

/* Main Result */
.result-main {
  display: grid;
  gap: 8px;
}

.result-caption {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--espresso);
}

.result-highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cream);
  border-left: 4px solid var(--primary);
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
}

.result-time-icon {
  font-size: 28px;
  line-height: 1;
}

.result-time-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-time {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.result-subtext {
  font-size: 14px;
  line-height: 1.5;
  color: var(--espresso);
}

/* Result Grid */
.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cream);
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
}

.result-card-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 4px;
}

.result-card-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--espresso);
}

.result-card-value {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

/* Flip Instruction */
.result-flip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--cream);
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
}

.result-flip.hidden {
  display: none;
}

.flip-icon {
  font-size: 20px;
  line-height: 1;
}

.flip-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* Pro Tip */
.pro-tip {
  padding: 16px;
  background: var(--cream);
  border-radius: 16px;
}

.pro-tip-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-tip-title::before {
  content: "💡";
  font-size: 16px;
}

.pro-tip-content {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

/* FAQ Section */
.tool-faq {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.faq-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 24px;
}

.tool-faq .accordion {
  margin-top: 0;
  max-width: none;
}

.tool-faq .accordion details summary {
  text-align: left;
}

/* CTA Section */
.tool-cta {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-headline {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 8px;
}

.cta-subtext {
  font-size: 16px;
  line-height: 1.5;
  color: var(--espresso);
  margin: 0 0 12px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  margin-top: 12px;
}

.cta-arrow {
  font-size: 18px;
  line-height: 1;
}

/* Animation */
.results-section {
  animation: fadeSlideIn var(--dur-move) var(--ease-out);
}

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

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .results-section {
    animation: none;
  }
}

/* Food Safety Callout */
.safety-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(244, 166, 35, 0.1);
  border: 1px solid rgba(244, 166, 35, 0.3);
  border-radius: 12px;
  margin-bottom: 24px;
}

.safety-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  color: var(--primary);
}

.safety-content {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.safety-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.safety-content a:hover {
  text-decoration: none;
}

/* Cooking Times Table Section */
.cooking-times-table {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.cooking-times-table h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 8px;
}

.table-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  margin: 0 0 24px;
}

.table-wrapper {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
}

.cooking-times-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card-solid);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}

.cooking-times-table th,
.cooking-times-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.cooking-times-table th {
  background: var(--cream);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--espresso);
}

.cooking-times-table tbody tr:last-child td {
  border-bottom: none;
}

.cooking-times-table tbody tr:hover {
  background: rgba(244, 166, 35, 0.05);
}

.table-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  margin: 16px 0 0;
  font-style: italic;
}

/* Mobile-friendly table */
@media (max-width: 480px) {
  .cooking-times-table table,
  .cooking-times-table thead,
  .cooking-times-table tbody,
  .cooking-times-table th,
  .cooking-times-table td,
  .cooking-times-table tr {
    display: block;
  }

  .cooking-times-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .cooking-times-table tr {
    border-bottom: 2px solid var(--border);
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .cooking-times-table tbody tr:last-child {
    border-bottom: none;
  }

  .cooking-times-table td {
    border: none;
    position: relative;
    padding: 8px 16px 8px 120px;
    text-align: right;
  }

  .cooking-times-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    width: 100px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--espresso);
  }
}

/* Doneness Guide Section */
.doneness-guide {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.doneness-guide h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  margin: 0 0 8px;
}

.guide-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  margin: 0 0 24px;
}

.doneness-methods {
  display: grid;
  gap: 16px;
}

.doneness-method {
  padding: 20px;
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-raised);
}

.doneness-method h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px;
}

.doneness-method p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.doneness-method em {
  color: var(--muted);
  font-style: italic;
}

.doneness-warning {
  margin-top: 20px;
  padding: 16px;
  background: rgba(244, 166, 35, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

/* Pro tip link styling */
.pro-tip-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pro-tip-content a:hover {
  text-decoration: none;
}

/* FAQ link styling */
.tool-faq .accordion p a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-faq .accordion p a:hover {
  text-decoration: none;
}

/* Cooking Method Guides Section */
.cooking-method-guides {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.method-guide {
  margin-bottom: 48px;
}

.method-guide:last-child {
  margin-bottom: 0;
}

.method-guide h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--text);
}

.method-guide h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 24px 0 12px;
  color: var(--text);
}

.method-guide p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 16px;
}

.method-guide ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.method-guide li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.method-guide li:last-child {
  margin-bottom: 0;
}

.method-guide li strong {
  color: var(--espresso);
}
