/* ============================================================
   BTC Crypto Postage — Complete Design
   ============================================================ */

.btc-shipping-wrapper {
    max-width: 960px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
}

/* ---- Hero Section ---- */
.btc-hero {
    text-align: center;
    padding: 40px 20px 30px;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: 16px;
    color: #fff;
}

.btc-hero h1 {
    margin: 0 0 10px;
    font-size: 2em;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.btc-hero p {
    margin: 0;
    font-size: 1.05em;
    color: #94a3b8;
    max-width: 520px;
    margin: 0 auto;
}

/* ---- Two-Column Address Layout ---- */
.btc-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

.btc-address-col {
    min-width: 0;
}

/* ---- Form Sections ---- */
.btc-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 22px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.btc-form-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btc-form-section h3 {
    margin: 0 0 18px 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.btc-section-icon {
    font-size: 1.2em;
    line-height: 1;
}

.btc-parcel-section {
    margin-top: 0;
}

/* ---- Field Grid ---- */
.btc-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.btc-row-2 > .btc-field {
    flex: 1;
}

.btc-row-4 > .btc-field {
    flex: 1;
}

.btc-field {
    margin-bottom: 14px;
    flex: 1;
}

.btc-field:last-child {
    margin-bottom: 0;
}

.btc-row + .btc-field,
.btc-field + .btc-row {
    margin-top: 0;
}

.btc-field label {
    display: block;
    font-weight: 600;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 5px;
    color: #475569;
}

.btc-field-hint {
    display: block;
    font-size: 0.75em;
    color: #94a3b8;
    margin-top: 3px;
    font-weight: 400;
}

.btc-field-tag {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 500;
    background: #e2e8f0;
    color: #475569;
    padding: 1px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    vertical-align: middle;
    margin-left: 4px;
}

.btc-field input[type="text"],
.btc-field input[type="tel"],
.btc-field input[type="number"],
.btc-field select {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.92em;
    font-family: inherit;
    background: #f8fafc;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.btc-field input:focus,
.btc-field select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #fff;
    outline: none;
}

.btc-field input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
}

.btc-field select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ---- Buttons ---- */
.btc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 34px;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    line-height: 1.4;
}

.btc-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    width: 100%;
    font-size: 1.05em;
    padding: 16px 34px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btc-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btc-btn-primary:active {
    transform: translateY(0);
}

.btc-btn-icon {
    font-size: 1.15em;
    line-height: 1;
}

.btc-btn-large {
    padding: 16px 36px;
    font-size: 1.05em;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}

.btc-btn-large:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btc-btn-small {
    padding: 6px 14px;
    font-size: 0.8em;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
}

.btc-btn-small:hover {
    background: #e2e8f0;
}

/* ---- Rates Table ---- */
.btc-rates {
    margin: 24px 0 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btc-rates h3 {
    margin: 0 0 18px 0;
    font-size: 1.15em;
    font-weight: 600;
    color: #0f172a;
}

.btc-rates table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.btc-rates thead {
    background: #f1f5f9;
}

.btc-rates th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.btc-rates td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92em;
}

.btc-rates tbody tr:last-child td {
    border-bottom: none;
}

.btc-rate-row {
    transition: background 0.15s;
    cursor: pointer;
}

.btc-rate-row:hover {
    background: #f0f7ff;
}

.btc-rate-row input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.btc-rate-row label {
    cursor: pointer;
    display: block;
}

/* ---- Rate Actions (Buy Now / Add to Cart) ---- */
.btc-rate-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.btc-rate-actions .btc-btn {
    flex: 1;
    min-width: 160px;
}

.btc-rate-actions-hint {
    font-size: 0.8em;
    color: #94a3b8;
    margin: 8px 0 0;
    text-align: center;
}

.btc-btn-cart {
    background: #fff;
    color: #1d4ed8;
    border: 2px solid #1d4ed8;
    box-shadow: none;
}

.btc-btn-cart:hover {
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.15);
    transform: translateY(-1px);
}

/* ---- Cart Summary ---- */
.btc-cart-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btc-cart-summary h3 {
    margin: 0 0 14px 0;
    font-size: 1.05em;
    font-weight: 600;
    color: #0f172a;
}

.btc-cart-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btc-cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.btc-cart-route {
    flex: 1;
    font-weight: 500;
    color: #1a1a2e;
    min-width: 180px;
}

.btc-cart-service {
    color: #64748b;
    font-size: 0.88em;
}

.btc-cart-price {
    font-weight: 700;
    color: #059669;
    font-size: 1em;
}

.btc-cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.btc-cart-footer strong {
    font-size: 1.05em;
    color: #0f172a;
}

.btc-cart-empty {
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    margin-bottom: 20px;
}

/* ---- Payment Info (Tor/no-JS friendly) ---- */
.btc-payment-info {
    margin: 24px 0 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.btc-payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 10px;
}

.btc-payment-header h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #0f172a;
}

.btc-payment-status-badge {
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fef3c7;
    color: #92400e;
    padding: 5px 12px;
    border-radius: 20px;
}

.btc-payment-main {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.btc-payment-left {
    flex: 1;
    min-width: 260px;
}

.btc-payment-right {
    flex-shrink: 0;
}

.btc-payment-amount-box {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.btc-amount-label {
    display: block;
    font-size: 0.78em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 4px;
}

.btc-amount-usd {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: #059669;
    line-height: 1.2;
}

.btc-amount-crypto {
    display: block;
    font-size: 0.9em;
    color: #64748b;
    margin-top: 4px;
    font-weight: 500;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.btc-address-section {
    margin-bottom: 10px;
}

.btc-address-display {
    background: #f8fafc;
    border: 1.5px dashed #93c5fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    word-break: break-all;
}

.btc-address-display code {
    font-size: 0.82em;
    color: #1e40af;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    user-select: all;
    -webkit-user-select: all;
}

.btc-address-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btc-btn-copy {
    padding: 8px 18px;
    font-size: 0.85em;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btc-btn-copy:hover {
    background: #dbeafe;
}

.btc-copy-hint {
    font-size: 0.78em;
    color: #94a3b8;
}

/* ---- QR Code ---- */
.btc-qr-section {
    text-align: center;
}

.btc-qr-code {
    display: block;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #fff;
}

.btc-qr-hint {
    display: block;
    font-size: 0.78em;
    color: #94a3b8;
    margin-top: 6px;
}

/* ---- Payment Instructions ---- */
.btc-payment-instructions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 22px;
    margin-top: 20px;
    font-size: 0.88em;
    color: #334155;
    line-height: 1.6;
}

.btc-payment-instructions ol {
    margin: 8px 0 0 20px;
    padding: 0;
}

.btc-payment-instructions li {
    margin-bottom: 6px;
}

.btc-payment-cta {
    text-align: center;
    margin: 20px 0 6px;
}

.btc-payment-cta-hint {
    text-align: center;
    font-size: 0.8em;
    color: #94a3b8;
    margin: 6px 0 0;
}

/* ---- No-JS Notice ---- */
.btc-noscript-note {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 0.88em;
    color: #92400e;
    text-align: center;
}

/* ---- Polling Status ---- */
.btc-poll {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
    margin-top: 18px;
    font-size: 0.92em;
    color: #92400e;
}

.btc-rate-select-form .btc-btn {
    margin-top: 18px;
}

/* ---- Success / Error / Loading ---- */
.btc-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 28px;
    margin: 24px 0;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.btc-success h3 {
    color: #166534;
    margin: 0 0 12px 0;
    font-size: 1.2em;
}

.btc-success .btc-btn {
    margin-top: 8px;
}

.btc-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 16px 20px;
    margin: 24px 0;
    color: #991b1b;
    font-size: 0.92em;
}

.btc-error ul {
    margin: 8px 0 0 16px;
    padding: 0;
}

.btc-error a,
.btc-error .btc-btn {
    margin-top: 8px;
}

.btc-pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.btc-loading {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 0.95em;
}

/* ---- Spinner ---- */
.btc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: btc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes btc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .btc-hero {
        padding: 28px 16px 24px;
    }

    .btc-hero h1 {
        font-size: 1.5em;
    }

    .btc-hero p {
        font-size: 0.92em;
    }

    .btc-addresses {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btc-row {
        flex-direction: column;
        gap: 0;
    }

    .btc-row-2 > .btc-field,
    .btc-row-4 > .btc-field {
        flex: none;
    }

    .btc-row .btc-field,
    .btc-row-2 .btc-field,
    .btc-row-4 .btc-field {
        margin-bottom: 14px;
    }

    .btc-form-section {
        padding: 18px 16px 14px;
    }

    .btc-btn-large {
        width: 100%;
    }

    .btc-payment-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .btc-label {
        min-width: auto;
    }

    .btc-rates {
        padding: 16px;
    }

    .btc-rates table {
        font-size: 0.82em;
    }

    .btc-rates th,
    .btc-rates td {
        padding: 10px;
    }

    .btc-payment-info {
        padding: 20px;
    }

    .btc-rates h3 {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .btc-hero h1 {
        font-size: 1.25em;
    }

    .btc-field input[type="text"],
    .btc-field input[type="tel"],
    .btc-field input[type="number"],
    .btc-field select {
        padding: 9px 11px;
        font-size: 0.88em;
    }

    .btc-btn-primary {
        padding: 14px 20px;
        font-size: 0.95em;
    }
}
