/* ============================================================
   NimbusPost Shipping – Frontend Styles
   ============================================================ */

/* ----- Product Page: Pincode Widget ----- */
.np-pincode-widget {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    margin-top:30px;
    background: #f9f9f9;
    font-family: inherit;
}

.np-pincode-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 15px;
}

.np-pincode-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.np-pincode-form input[type="tel"] {
    flex: 1;
    min-width: 120px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.np-pincode-form button {
    padding: 8px 18px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.np-pincode-form button:hover  { background: #1a252f; }
.np-pincode-form button:disabled { opacity: 0.6; cursor: not-allowed; }

.np-delivery-result {
    margin-top: 10px;
    font-size: 14px;
    min-height: 22px;
}

.np-delivery-result.np-success { color: #2e7d32; }
.np-delivery-result.np-error   { color: #c62828; }
.np-delivery-result.np-info    { color: #1565c0; }

/* ----- Checkout: Courier Panel ----- */
.np-courier-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.np-courier-title {
    margin: 0 0 14px;
    font-size: 17px;
    color: #2c3e50;
}

.np-checkout-pincode-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}

.np-input-row {
    display: flex;
    gap: 8px;
}

.np-input-row input[type="tel"] {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.np-courier-results {
    margin-top: 14px;
}

.np-courier-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.np-courier-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.np-courier-item:hover,
.np-courier-item.np-active {
    border-color: #2c3e50;
    background: #f0f4f8;
}

.np-courier-item.np-active { border-color: #27ae60; background: #eafaf1; }

.np-courier-info { display: flex; flex-direction: column; gap: 3px; }

.np-courier-name { font-weight: 700; font-size: 14px; }

.np-courier-edd {
    font-size: 12px;
    color: #666;
}

.np-courier-price {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    white-space: nowrap;
}

.np-courier-select-btn {
    padding: 6px 14px;
    border: 1px solid #2c3e50;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.np-courier-select-btn:hover,
.np-courier-item.np-active .np-courier-select-btn {
    background: #2c3e50;
    color: #fff;
}

.np-selected-note { color: #27ae60; font-weight: 600; margin: 0; }

/* ----- Tracking Page ----- */
.np-tracking-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.np-tracking-header {
    text-align: center;
    margin-bottom: 24px;
}

.np-tracking-search {
    margin-bottom: 28px;
}

.np-tracking-input-group {
    display: flex;
    gap: 10px;
    max-width: 520px;
    margin: 0 auto;
}

.np-tracking-input-group input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
}

.np-tracking-error {
    color: #c62828;
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
}

.np-tracking-summary {
    background: #f4f6f9;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 22px;
}

.np-tracking-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.np-info-item { display: flex; flex-direction: column; gap: 4px; }

.np-info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #777;
}

.np-info-value { font-size: 15px; font-weight: 600; }

.np-tracking-timeline-wrap h3 { margin-bottom: 14px; }

.np-tracking-timeline-public {
    position: relative;
    padding-left: 28px;
}

.np-tracking-timeline-public::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: #e0e0e0;
}

.np-event-item {
    position: relative;
    margin-bottom: 16px;
}

.np-event-item::before {
    content: '●';
    position: absolute;
    left: -24px;
    top: 2px;
    color: #2c3e50;
    font-size: 12px;
}

.np-event-item.np-event-latest::before { color: #27ae60; font-size: 14px; }

.np-event-date {
    font-size: 11px;
    color: #888;
    display: block;
    margin-bottom: 2px;
}

.np-event-desc { font-size: 14px; }
.np-event-loc  { font-size: 12px; color: #aaa; }

/* Loader */
.np-tracking-loader {
    text-align: center;
    padding: 24px;
    color: #555;
}

.np-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ccc;
    border-top-color: #2c3e50;
    border-radius: 50%;
    animation: np-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes np-spin { to { transform: rotate(360deg); } }

/* ----- Badges ----- */
.np-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.np-badge-booked      { background: #e3f2fd; color: #1565c0; }
.np-badge-in-transit,
.np-badge-in_transit  { background: #fff3e0; color: #e65100; }
.np-badge-delivered   { background: #e8f5e9; color: #2e7d32; }
.np-badge-pending     { background: #f5f5f5; color: #616161; }
.np-badge-cancelled   { background: #fce4ec; color: #b71c1c; }
.np-badge-rto-delivered { background: #f3e5f5; color: #6a1b9a; }
.np-badge-loading     { background: #e0e0e0; color: #777; }

/* My Account */
.np-order-details { margin-top: 24px; }

.np-order-details-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Responsive */
@media (max-width: 600px) {
    .np-tracking-input-group { flex-direction: column; }
    .np-courier-item { flex-wrap: wrap; gap: 8px; }
}
