/* TrackMyOrder Canshipmeds - matching canshipmeds.com design */
.csm-tmo-container {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.csm-tmo-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.csm-tmo-header {
  padding: 30px 30px 20px 30px;
  background: #008815;
  border-bottom: 1px solid #e0e0e0;
}

.csm-tmo-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: -0.02em;
}

.csm-tmo-subtitle {
  margin: 8px 0 0 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 400;
}

.csm-tmo-form {
  padding: 30px;
  background: #ffffff;
}

.csm-tmo-input-group {
  display: flex;
  gap: 0;
  align-items: stretch;
  border-radius: 4px;
  overflow: hidden;
  height: 40px;
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
}

.csm-tmo-input {
  flex: 1;
  border: 1px solid #ced4da;
  border-right: none;
  border-radius: 0;
  padding: 14px 18px;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #ffffff;
  color: #495057;
  height: auto;
  box-sizing: border-box;
  margin-bottom: 0px !important;
}

.csm-tmo-input::placeholder {
  color: #adb5bd;
}

.csm-tmo-input:focus {
  border-color: #4a7c59;
  box-shadow: inset 0 0 0 1px #4a7c59;
  z-index: 1;
}

.csm-tmo-button {
  background: #ff6b35;
  color: #ffffff;
  border: 1px solid #ff6b35;
  border-radius: 0;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .05s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: auto;
  box-sizing: border-box;
  position: relative;
  white-space: nowrap;
}

/* .csm-tmo-button::before {
  content: "🔍";
  margin-right: 8px;
  font-size: 18px;
} */

.csm-tmo-button:hover {
  background: #e55a2b;
  border-color: #e55a2b;
  transform: translateY(-1px);
}

.csm-tmo-button:active {
  transform: translateY(0);
  background: #cc4a23;
}
.csm-tmo-meta {
  margin-top: 16px;
  color: #6c757d;
  font-size: 14px;
  padding: 12px 0;
  border-top: 1px solid #f0f0f0;
}

.csm-tmo-meta-label {
  color: #495057;
  font-weight: 500;
}

.csm-tmo-meta-value {
  font-weight: 700;
  margin-left: 8px;
  color: #4a7c59;
}

.csm-tmo-results {
  border-top: 2px solid #4a7c59;
  background: #ffffff;
  padding: 30px;
}

/* Carrier button wrapper */
.csm-tmo-carrier-button-wrapper {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}

.csm-tmo-carrier-button {
  display: inline-block;
  background: #008815;
  color: #ffffff;
  border: 2px solid #008815;
  border-radius: 6px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
  text-decoration: none !important;
}
.csm-tmo-carrier-button a{
  /* text-transform: none; */
  text-decoration: none !important;
}
.csm-tmo-carrier-button:hover {
  background: #3a6b49;
  border-color: #3a6b49;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.csm-tmo-carrier-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(74, 124, 89, 0.2);
}

/* Status badge */
.csm-tmo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9ecef;
}

.csm-tmo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.csm-tmo-badge--delivered { 
  background: #d4edda; 
  color: #155724; 
  border-color: #c3e6cb; 
}

.csm-tmo-badge--in_transit { 
  background: #cce5ff; 
  color: #004085; 
  border-color: #99ccff; 
}

.csm-tmo-badge--out_for_delivery { 
  background: #fff3cd; 
  color: #856404; 
  border-color: #ffeaa7; 
}

.csm-tmo-badge--pre_transit { 
  background: #e2e3e5; 
  color: #383d41; 
  border-color: #d6d8db; 
}

.csm-tmo-badge--unknown { 
  background: #f8f9fa; 
  color: #6c757d; 
  border-color: #dee2e6; 
}

/* Timeline - Confident Professional Design */
.csm-tmo-results h4 {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 24px 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #4a7c59;
}

.csm-tmo-results h4:first-of-type {
  margin-top: 0;
}

.csm-tmo-timeline {
  margin-top: 24px;
  position: relative;
  padding-left: 8px;
}

.csm-tmo-timeline-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 20px;
  padding: 20px 0;
  position: relative;
}

.csm-tmo-timeline-item:first-child {
  padding-top: 0;
}

.csm-tmo-timeline-item:last-child {
  padding-bottom: 0;
}

.csm-tmo-timeline-item:last-child .csm-tmo-tl-marker::before {
  display: none;
}

.csm-tmo-tl-marker {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.csm-tmo-tl-marker::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  bottom: -20px;
  width: 3px;
  background: linear-gradient(to bottom, #4a7c59, #e9ecef);
  z-index: 0;
}

.csm-tmo-tl-dot {
  position: relative;
  z-index: 2;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid #4a7c59;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.1), 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.csm-tmo-timeline-item:first-child .csm-tmo-tl-dot {
  border-color: #ff6b35;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.csm-tmo-tl-content {
  padding-top: 2px;
  background: #ffffff;
  border-radius: 6px;
  padding: 16px;
  border-left: 3px solid #4a7c59;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.csm-tmo-timeline-item:first-child .csm-tmo-tl-content {
  border-left-color: #ff6b35;
  background: #fff5f2;
}

.csm-tmo-tl-content:hover {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateX(2px);
}

.csm-tmo-tl-title {
  margin: 0 0 8px 0;
  font-weight: 700;
  font-size: 15px;
  color: #2c3e50;
  line-height: 1.4;
}

.csm-tmo-tl-meta {
  margin: 0;
  font-size: 13px;
  color: #6c757d;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.csm-tmo-tl-meta strong {
  color: #495057;
  font-weight: 600;
}
.csm-tmo-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 20px;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #4a7c59;
}

.csm-tmo-kv dt {
  color: #6c757d;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.csm-tmo-kv dd {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: #2c3e50;
}

.csm-tmo-kv dd a {
  color: #4a7c59;
  text-decoration: none;
  font-weight: 600;
}

.csm-tmo-kv dd a:hover {
  text-decoration: underline;
  color: #3a6b49;
}

/* Links grid */
.csm-tmo-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.csm-tmo-link {
  display: block;
  border: 2px solid #4a7c59;
  border-radius: 6px;
  padding: 16px 20px;
  text-decoration: none;
  color: #2c3e50;
  transition: all 0.2s ease;
  background: #ffffff;
  font-weight: 600;
}

.csm-tmo-link:hover {
  border-color: #ff6b35;
  background: #fff5f2;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
  transform: translateY(-2px);
}

.csm-tmo-link strong {
  display: block;
  color: #4a7c59;
  font-size: 15px;
  margin-bottom: 4px;
}

.csm-tmo-link:hover strong {
  color: #ff6b35;
}

.csm-tmo-link small {
  display: block;
  color: #6c757d;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  word-break: break-all;
}

/* Loading skeleton */
.csm-tmo-skeleton {
  display: grid;
  gap: 8px;
}
.csm-tmo-skel-line {
  height: 12px;
  background: linear-gradient(90deg, #f3f4f8, #eceef6, #f3f4f8);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: csm-tmo-shine 1.1s linear infinite;
}
@keyframes csm-tmo-shine {
  0% { background-position: 200% 0; }
  100% { background-position: 0 0; }
}

/* Debug section */
.csm-tmo-debug {
  margin-top: 30px;
  padding: 15px;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.csm-tmo-debug h4 {
  margin-top: 0;
  color: #d63638;
  font-size: 14px;
  font-weight: 600;
}
.csm-tmo-debug details {
  margin-top: 10px;
}
.csm-tmo-debug summary {
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 10px;
  color: #50575e;
  padding: 8px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #ddd;
}
.csm-tmo-debug summary:hover {
  background: #f5f5f5;
}
.csm-tmo-debug pre {
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 11px;
  line-height: 1.4;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .csm-tmo-container {
    padding: 0 15px;
    margin: 20px auto;
  }
  
  .csm-tmo-header {
    padding: 20px 20px 15px 20px;
  }
  
  .csm-tmo-title {
    font-size: 24px;
  }
  
  .csm-tmo-form {
    padding: 20px;
  }
  
  .csm-tmo-input-group {
    flex-direction: column;
  }
  
  .csm-tmo-input {
    border-right: 1px solid #ced4da;
    border-radius: 4px 4px 0 0;
  }
  
  .csm-tmo-button {
    border-radius: 0 0 4px 4px;
    width: 100%;
  }
  
  .csm-tmo-results {
    padding: 20px;
  }
  
  .csm-tmo-timeline-item {
    grid-template-columns: 30px 1fr;
    gap: 15px;
  }
  
  .csm-tmo-kv {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .csm-tmo-kv dt {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 4px;
  }
}

@media (prefers-color-scheme: dark) {
  .csm-tmo-card { 
    background: #1a1a1a; 
    border-color: #333; 
  }
  
  .csm-tmo-header {
    background: #222;
    border-color: #333;
  }
  
  .csm-tmo-title {
    color: #ffffff;
  }
  
  .csm-tmo-subtitle, .csm-tmo-meta, .csm-tmo-tl-meta, .csm-tmo-link small { 
    color: #adb5bd; 
  }
  
  .csm-tmo-results { 
    background: #1a1a1a; 
    border-color: #333; 
  }
  
  .csm-tmo-input { 
    background: #2a2a2a; 
    border-color: #444; 
    color: #ffffff; 
  }
  
  .csm-tmo-input::placeholder {
    color: #6c757d;
  }
  
  .csm-tmo-tl-content {
    background: #222;
    border-color: #4a7c59;
  }
  
  .csm-tmo-timeline-item:first-child .csm-tmo-tl-content {
    background: #2a1f1c;
    border-color: #ff6b35;
  }
  
  .csm-tmo-tl-content:hover {
    background: #2a2a2a;
  }
  
  .csm-tmo-tl-title { 
    color: #ffffff; 
  }
  
  .csm-tmo-tl-marker::before { 
    background: linear-gradient(to bottom, #4a7c59, #444); 
  }
  
  .csm-tmo-kv {
    background: #222;
    border-color: #4a7c59;
  }
  
  .csm-tmo-kv dt {
    color: #adb5bd;
  }
  
  .csm-tmo-kv dd {
    color: #ffffff;
  }
  
  .csm-tmo-link { 
    background: #222; 
    border-color: #4a7c59; 
    color: #ffffff; 
  }
  
  .csm-tmo-link:hover {
    background: #2a1f1c;
    border-color: #ff6b35;
  }
  
  .csm-tmo-debug { 
    background: #1e1e1e; 
    border-color: #3a3a3a; 
  }
  
  .csm-tmo-debug summary { 
    background: #2a2a2a; 
    border-color: #3a3a3a; 
    color: #e9ebf5; 
  }
  
  .csm-tmo-debug summary:hover { 
    background: #333; 
  }
  
  .csm-tmo-debug pre { 
    background: #1a1a1a; 
    border-color: #3a3a3a; 
    color: #e9ebf5; 
  }
}


