/* =========================================================
   GenPeptide Order Tracker - Professional Styling
   Brand colors:
     Navy:      #1a3a5c  (header / primary buttons)
     Navy Dark: #122844  (hover)
     Blue:      #2e6bb8  (banner / accents)
     Green:     #22c55e  (CTA button)
     Green Dk:  #16a34a  (CTA hover)
     Text:      #1f2937
     Muted:     #6b7280
     Border:    #e5e7eb
     Bg Soft:   #f9fafb
   ========================================================= */

.cbwct-tracking-container {
    max-width: 1140px;
    margin: 30px auto 60px;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
}

.cbwct-tracking {
    max-width: 100%;
    margin: 0 auto;
}

/* Hide the plugin's built-in heading (page already has one) */
.cbwct-tracking-title {
    display: none;
}

/* ---------- Form ---------- */
.cbwct-tracking-from {
    margin: 0 0 30px;
}

.cbwct-tracking-form-area {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: flex-start;
}

.cbwct-tracking-form-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    min-width: 220px;
}

.cbwct-tracking-from form label {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 6px;
    padding: 0;
    font-family: inherit;
    text-align: left;
}

.cbwct-tracking-from form input[type="text"],
.cbwct-tracking-from form input[type="email"] {
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    width: 100%;
    margin: 0;
    font-size: 15px;
    color: #1f2937;
    background: #fff;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: inherit;
}

.cbwct-tracking-from form input[type="text"]:focus,
.cbwct-tracking-from form input[type="email"]:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}

/* CTA Button - matches site's green Track Order button */
.cbwct-tracking-from form input[type="submit"],
.cbwct-tracking-from form input[type="button"],
.cbwct-tracking-from input#submit,
.cbwct-tracking-from button {
    background: #22c55e !important;
    background-color: #22c55e !important;
    background-image: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    color: #ffffff !important;
    padding: 12px 28px !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    cursor: pointer !important;
    filter: none !important;
    transition: background-color .15s ease, transform .05s ease;
    font-family: inherit !important;
    line-height: 1.2 !important;
    height: auto !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.cbwct-tracking-from form input[type="submit"]:hover,
.cbwct-tracking-from button:hover {
    background: #16a34a !important;
    background-color: #16a34a !important;
    filter: none !important;
}

.cbwct-tracking-from form input[type="submit"]:active {
    transform: translateY(1px);
}

.cbwct-traking-form-submit {
    flex: 0 0 auto;
    min-width: auto;
}

/* ---------- Status Header (replaces the animated rainbow bar) ---------- */
.cbwct-status-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.cbwct-status-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbwct-status-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 600;
}

.cbwct-status-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a3a5c;
}

.cbwct-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #eff6ff;
    color: #1a3a5c;
    border: 1px solid #dbeafe;
}

.cbwct-status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2e6bb8;
}

.cbwct-status-badge.is-pending     { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.cbwct-status-badge.is-pending::before     { background:#f59e0b; }
.cbwct-status-badge.is-on-hold     { background:#fef3c7; color:#92400e; border-color:#fde68a; }
.cbwct-status-badge.is-on-hold::before     { background:#f59e0b; }
.cbwct-status-badge.is-processing  { background:#dbeafe; color:#1e40af; border-color:#bfdbfe; }
.cbwct-status-badge.is-processing::before  { background:#2e6bb8; }
.cbwct-status-badge.is-shipped     { background:#dbeafe; color:#1e40af; border-color:#bfdbfe; }
.cbwct-status-badge.is-shipped::before     { background:#2e6bb8; }
.cbwct-status-badge.is-completed   { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.cbwct-status-badge.is-completed::before   { background:#22c55e; }
.cbwct-status-badge.is-cancelled,
.cbwct-status-badge.is-refunded,
.cbwct-status-badge.is-failed      { background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.cbwct-status-badge.is-cancelled::before,
.cbwct-status-badge.is-refunded::before,
.cbwct-status-badge.is-failed::before { background:#dc2626; }

/* ---------- Progress Bar (clean horizontal stepper) ---------- */
.cbwct-tracking-porgressbar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 32px 24px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

/* Cancelled / refunded / failed message */
.cbwct_wc_order_cancelled {
    background: #fee2e2 !important;
    color: #991b1b !important;
    padding: 16px 20px !important;
    border-radius: 6px !important;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid #fecaca;
}

/* Hidden progress fill (we use the stepper instead) */
.cbwct-tracking-progress {
    display: none;
}
.cbwct-tracking-progress.cbwct_wc_order_cancelled {
    display: block;
}

/* Stepper */
.cbwct_wc_traking_steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Connector line behind the dots */
.cbwct_wc_traking_steps::before {
    content: '';
    position: absolute;
    top: 56px;
    left: 8%;
    right: 8%;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
    border-radius: 3px;
}

/* Filled connector for completed steps */
.cbwct_wc_traking_steps::after {
    content: '';
    position: absolute;
    top: 56px;
    left: 8%;
    height: 3px;
    background: linear-gradient(to right, #22c55e, #2e6bb8);
    z-index: 1;
    border-radius: 3px;
    width: var(--cbwct-progress, 0%);
    max-width: 84%;
    transition: width .6s ease;
}

.cbwct_wc_traking_step {
    flex: 1 1 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.cbwct-wc-traking-img {
    margin: 0 auto 16px;
    width: 48px;
    height: 48px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease, border-color .3s ease;
}

.cbwct-wc-traking-img img {
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    filter: grayscale(100%) opacity(0.5);
    transition: filter .3s ease;
}

.cbwct_wc_traking_step.is-active .cbwct-wc-traking-img,
.cbwct_wc_traking_step.is-done .cbwct-wc-traking-img {
    background: #ffffff;
    border-color: #2e6bb8;
}

.cbwct_wc_traking_step.is-active .cbwct-wc-traking-img img,
.cbwct_wc_traking_step.is-done .cbwct-wc-traking-img img {
    filter: none;
}

.cbwct-wc-traking-round {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: 3px solid #d1d5db;
    border-radius: 50%;
    margin: 0 auto;
    transition: background .3s ease, border-color .3s ease;
    position: relative;
    box-shadow: 0 0 0 4px #ffffff;
}

.cbwct-wc-traking-round.active {
    background: #2e6bb8;
    border-color: #2e6bb8;
}

/* Label under the dot */
.cbwct_wc_traking_step .cbwct-step-label {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.3;
}

.cbwct_wc_traking_step.is-active .cbwct-step-label,
.cbwct_wc_traking_step.is-done .cbwct-step-label {
    color: #1a3a5c;
    font-weight: 600;
}

/* Strip ALL the old animations on the dots/icons */
.cbwct-wc-traking-round.active:before,
.cbwct-wc-traking-round.active:after {
    display: none !important;
    content: none !important;
    animation: none !important;
}

.cbwct_shipping {
    display: none !important;
}

.cbwct_progress {
    animation: none !important;
}

/* ---------- Result Table ---------- */
.cbwct-tracking-list {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.cbwct-tracking-list table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.cbwct-tracking-container td {
    padding: 14px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    line-height: 1.5;
    vertical-align: top;
    background: transparent !important;
}

.cbwct-tracking-list table tr:last-child td {
    border-bottom: none;
}

.cbwct-tracking-container table tr td:first-child {
    font-size: 13px !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: 200px;
    background: #f9fafb !important;
}

.cbwct-tracking-container table tr td:nth-child(2) {
    color: #1f2937;
    font-weight: 500;
}

/* Override the old odd-row blue tint */
.cbwct-tracking-container table tbody tr:nth-child(odd),
.cbwct-tracking-container tr:nth-child(odd),
.cbwct-tracking-container tr:nth-child(odd) td {
    background-color: transparent !important;
}

.cbwct-tracking-container table tr:hover td:nth-child(2) {
    background: #f9fafb !important;
}

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

.cbwct-tracking-list li {
    margin: 0 0 6px;
    line-height: 1.5;
}

.cbwct-tracking-list li:last-child {
    margin-bottom: 0;
}

.cbwct-tracking-list a {
    color: #2e6bb8;
    text-decoration: none;
    font-weight: 500;
}

.cbwct-tracking-list a:hover {
    color: #1a3a5c;
    text-decoration: underline;
}

/* Tracking number link styling */
.cbwct-tracking-number-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #eff6ff;
    color: #1a3a5c !important;
    border: 1px solid #dbeafe;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease;
}

.cbwct-tracking-number-link:hover {
    background: #dbeafe;
    border-color: #2e6bb8;
    color: #1a3a5c !important;
    text-decoration: none !important;
}

.cbwct-tracking-number-link::after {
    content: '↗';
    font-size: 12px;
    opacity: 0.7;
}

.cbwct-tracking-provider {
    display: inline-block;
    font-weight: 700;
    color: #1f2937;
    margin-right: 8px;
}

.cbwct-tracking-empty {
    color: #6b7280;
    font-style: italic;
    font-size: 14px;
}

/* ---------- Notice / Error messages ---------- */
.cbwct_notice {
    color: #991b1b !important;
    background: #fee2e2;
    border: 1px solid #fecaca;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    margin: 20px 0;
    display: block;
}

/* ---------- Result area ---------- */
.cbwct-traking-form-result {
    margin-top: 24px;
}

.cbwct-traking-form-result:empty {
    margin-top: 0;
}

/* ---------- Loader ---------- */
.cbwct_result_preload_area {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.cbwct_wc_order_tracker_loader {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 24px;
}

.cbwct_wc_order_tracker_loader div {
    display: inline-block;
    position: absolute;
    width: 10px;
    background: #1a3a5c;
    border-radius: 2px;
    animation: cbwct_loader 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}

.cbwct_wc_order_tracker_loader div:nth-child(1) { left: 6px;  animation-delay: -0.24s; }
.cbwct_wc_order_tracker_loader div:nth-child(2) { left: 24px; animation-delay: -0.12s; }
.cbwct_wc_order_tracker_loader div:nth-child(3) { left: 42px; animation-delay: 0; }

@keyframes cbwct_loader {
    0%        { top: 0;  height: 24px; }
    50%, 100% { top: 6px; height: 12px; }
}
