/**
 * Contact Section — Redesign (v2)
 * TaskTweaky · template-shopify.php
 *
 * All selectors are prefixed with `ttcr-` to avoid collisions with
 * existing contact-*, form-group, etc. styles loaded from main.css.
 *
 * Enqueued via functions.php on the Shopify Development page template only.
 */

/* ─── Layout ───────────────────────────────────────────────────────── */

.ttcr-section {
  background: #f0f4fd !important;
}

.ttcr-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

/* ─── Left panel ────────────────────────────────────────────────────── */

.ttcr-info-panel {
  position: sticky;
  top: 100px;
}

.ttcr-eyebrow {
  display: inline-flex;
  align-items: center;
  background: #e6faf8;
  color: #20a89d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(46, 196, 182, 0.3);
  margin-bottom: 16px;
}

.ttcr-heading {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  color: #111827;
  line-height: 1.18;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
}

.ttcr-subtext {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.75;
  margin: 0 0 28px;
}

/* ── Contact cards ── */

.ttcr-contact-cards {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 0;
}

.ttcr-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.ttcr-contact-item:last-child {
  border-bottom: none;
}

.ttcr-contact-item:hover {
  background: #f9fafb;
}

.ttcr-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #2563eb;
}

.ttcr-contact-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ttcr-contact-label {
  font-size: 10px;
  font-weight: 700;
  color: #2563eb;
  letter-spacing: 0.08em;
}

.ttcr-contact-value {
  font-size: 13.5px;
  color: #374151;
  font-weight: 500;
}

/* ── Trust card ── */

.ttcr-trust-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 18px 20px;
  margin-top: 14px;
}

.ttcr-trust-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 14px;
}

.ttcr-trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ttcr-trust-list li {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
  padding-left: 24px;
  position: relative;
}

.ttcr-trust-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 15px;
  height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%232ec4b6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ─── Right form card ───────────────────────────────────────────────── */

.ttcr-form-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.10);
  padding: 36px 40px;
}

.ttcr-form-heading {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
}

.ttcr-form-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
}

/* ─── Selected package banner ────────────────────────────────────────── */

.ttcr-pkg-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #e6faf8;
  border: 1.5px solid rgba(46, 196, 182, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
  transition: background 0.2s, border-color 0.2s;
}

/* Flash animation — added/removed by JS when package is updated */
@keyframes ttcr-banner-flash-anim {
  0%   { background: #b2f2ec; border-color: rgba(46, 196, 182, 0.6); }
  100% { background: #e6faf8; border-color: rgba(46, 196, 182, 0.25); }
}

.ttcr-banner-flash {
  animation: ttcr-banner-flash-anim 0.5s ease-out forwards;
}

/* Placeholder state — shown until a pricing CTA is clicked */
.ttcr-pkg-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #6b7280;
  font-size: 13px;
}

.ttcr-pkg-placeholder-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.ttcr-pkg-placeholder-text {
  font-style: italic;
}

.ttcr-pkg-check {
  flex-shrink: 0;
  margin-top: 2px;
}

.ttcr-pkg-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ttcr-pkg-eyebrow {
  font-size: 10px;
  font-weight: 700;
  color: #20a89d;
  letter-spacing: 0.1em;
}

.ttcr-pkg-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ttcr-pkg-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ttcr-pkg-label {
  font-size: 15.5px;
  font-weight: 700;
  color: #111827;
}

.ttcr-pkg-desc {
  font-size: 12px;
  color: #6b7280;
}

.ttcr-change-pkg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: inherit;
  line-height: 1;
}

.ttcr-change-pkg-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.ttcr-change-pkg-btn:active {
  transform: translateY(1px);
}

/* ─── Form rows & fields ─────────────────────────────────────────────── */

.ttcr-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.ttcr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.ttcr-form-row .ttcr-field {
  margin-bottom: 0;
}

.ttcr-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.ttcr-label-opt {
  font-weight: 400;
  color: #9ca3af;
}

.ttcr-required {
  color: #ef4444;
}

.ttcr-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13.5px;
  color: #111827;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  outline: none;
}

.ttcr-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ttcr-input::placeholder {
  color: #9ca3af;
}

.ttcr-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.ttcr-field-hint {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 2px;
}

/* Input with icon */

.ttcr-input-icon-wrap {
  position: relative;
}

.ttcr-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.ttcr-input--icon-left {
  padding-left: 34px;
}

/* Select */

.ttcr-select-wrap {
  position: relative;
}

.ttcr-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  font-size: 13.5px;
  color: #111827;
  background: #fff;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.ttcr-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.ttcr-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* Priority radio cards */

.ttcr-priority-group {
  display: flex;
  gap: 10px;
}

.ttcr-priority-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ttcr-priority-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.ttcr-priority-card--selected,
.ttcr-priority-card:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.ttcr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ttcr-radio-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  margin-bottom: 4px;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  flex-shrink: 0;
}

.ttcr-priority-card--selected .ttcr-radio-dot,
.ttcr-priority-card:has(input:checked) .ttcr-radio-dot {
  border-color: #2563eb;
  background: #2563eb;
}

.ttcr-priority-card--selected .ttcr-radio-dot::after,
.ttcr-priority-card:has(input:checked) .ttcr-radio-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
}

.ttcr-priority-main {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.ttcr-priority-sub {
  font-size: 11px;
  color: #9ca3af;
}

/* ─── Upload zone ────────────────────────────────────────────────────── */

.ttcr-upload-zone {
  border: 2px dashed #e5e7eb;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}

.ttcr-upload-zone:hover,
.ttcr-upload-zone:focus {
  border-color: #2563eb;
  background: #eff6ff;
  outline: none;
}

.ttcr-upload-zone.ttcr-drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.ttcr-upload-zone.ttcr-has-file {
  border-color: #2ec4b6;
  background: #e6faf8;
}

.ttcr-upload-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.ttcr-upload-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.ttcr-upload-text {
  font-size: 13px;
  color: #374151;
  margin: 0 0 4px;
  line-height: 1.5;
}

.ttcr-upload-browse {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ttcr-upload-hint {
  font-size: 11.5px;
  color: #9ca3af;
  margin: 0;
}

.ttcr-upload-filename {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0;
  word-break: break-all;
}

/* ─── Form error ─────────────────────────────────────────────────────── */

.ttcr-form-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 16px;
}

/* ─── Submit button ──────────────────────────────────────────────────── */

.ttcr-submit-btn {
  width: 100%;
  padding: 15px 24px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  margin-bottom: 12px;
  font-family: inherit;
}

.ttcr-submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.ttcr-submit-btn:active {
  transform: translateY(0);
}

.ttcr-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ─── Security note ──────────────────────────────────────────────────── */

.ttcr-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
  text-align: center;
}

/* ─── Package change modal ───────────────────────────────────────────── */

.ttcr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ttcr-modal-overlay.ttcr-modal-visible {
  opacity: 1;
}

.ttcr-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
  width: 100%;
  max-width: 440px;
  transform: translateY(16px);
  transition: transform 0.2s;
}

.ttcr-modal-overlay.ttcr-modal-visible .ttcr-modal {
  transform: translateY(0);
}

.ttcr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.ttcr-modal-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.ttcr-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.ttcr-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.ttcr-modal-body {
  padding: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Modal package option */

.ttcr-modal-pkg-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ttcr-modal-pkg-option:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.ttcr-modal-pkg-option.ttcr-pkg-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.ttcr-modal-pkg-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ttcr-modal-pkg-text {
  flex: 1;
  min-width: 0;
}

.ttcr-modal-pkg-name {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.ttcr-modal-pkg-desc {
  font-size: 12px;
  color: #6b7280;
}

.ttcr-modal-pkg-check {
  flex-shrink: 0;
  display: none;
  color: #2563eb;
}

.ttcr-modal-pkg-option.ttcr-pkg-active .ttcr-modal-pkg-check {
  display: flex;
}

/* ─── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .ttcr-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ttcr-info-panel {
    position: static;
  }

  .ttcr-form-card {
    padding: 28px 24px;
  }

  .ttcr-heading {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .ttcr-form-row {
    grid-template-columns: 1fr;
  }

  .ttcr-form-card {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .ttcr-pkg-banner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .ttcr-change-pkg-btn {
    width: 100%;
    justify-content: center;
  }

  .ttcr-priority-group {
    flex-direction: row;
  }

  .ttcr-submit-btn {
    font-size: 15px;
    padding: 14px 20px;
  }

  .ttcr-heading {
    font-size: 24px;
  }
}
