/**
 * TRA-style Receipt Verification Portal
 * Mobile-first layout matching official taxpayer verification portal design.
 */

:root {
    --tra-yellow: #f5d000;
    --tra-yellow-btn: #f0c800;
    --tra-text: #607d8b;
    --tra-text-dark: #455a64;
    --tra-border: #e0e0e0;
    --tra-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.tra-portal {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--tra-bg);
    color: var(--tra-text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Yellow header banner */
.tra-header {
    background: var(--tra-yellow);
    color: #000;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.3px;
    padding: 14px 12px;
    text-transform: uppercase;
}

.tra-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 0 24px;
}

/* Receipt markers */
.tra-marker {
    text-align: center;
    color: #90a4ae;
    font-size: 12px;
    padding: 14px 16px 10px;
    letter-spacing: 0.5px;
}

/* Logo */
.tra-logo-wrap {
    text-align: center;
    padding: 8px 16px 16px;
}

.tra-logo {
    width: 110px;
    height: auto;
    display: inline-block;
}

/* Seller block - centered */
.tra-seller {
    text-align: center;
    padding: 0 20px 12px;
    color: var(--tra-text);
}

.tra-seller-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--tra-text-dark);
    text-transform: uppercase;
    margin-bottom: 6px;
    line-height: 1.35;
}

.tra-seller-line {
    font-size: 13px;
    line-height: 1.6;
    text-transform: uppercase;
}

/* Section dividers */
.tra-divider {
    border: none;
    border-top: 1px solid var(--tra-border);
    margin: 0 16px;
}

/* Info rows - left aligned labels */
.tra-section {
    padding: 12px 20px;
}

.tra-row {
    font-size: 13px;
    line-height: 1.7;
    text-transform: uppercase;
    color: var(--tra-text-dark);
    font-weight: 600;
}

.tra-row span {
    font-weight: 600;
}

/* Purchased items */
.tra-items-title {
    padding: 14px 20px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tra-text);
}

.tra-items-table {
    width: 100%;
    border-collapse: collapse;
    padding: 0 12px;
}

.tra-items-table thead th {
    font-size: 12px;
    font-weight: 600;
    color: var(--tra-text);
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--tra-border);
}

.tra-items-table thead th:nth-child(2),
.tra-items-table thead th:nth-child(3),
.tra-items-table thead th:nth-child(4) {
    text-align: right;
    width: 50px;
}

.tra-items-table tbody td {
    font-size: 13px;
    color: var(--tra-text-dark);
    padding: 10px 8px;
    vertical-align: top;
    border-bottom: 1px solid #f5f5f5;
    text-transform: uppercase;
    font-weight: 600;
}

.tra-items-table tbody td:nth-child(2),
.tra-items-table tbody td:nth-child(3),
.tra-items-table tbody td:nth-child(4) {
    text-align: right;
    white-space: nowrap;
}

.tra-items-wrap {
    padding: 0 12px;
}

/* Tax summary */
.tra-summary {
    padding: 8px 20px 4px;
}

.tra-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--tra-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--tra-text-dark);
    text-transform: uppercase;
}

.tra-summary-row:last-child {
    border-bottom: none;
    font-size: 14px;
}

.tra-summary-row .tra-val {
    font-weight: 700;
    color: #333;
    text-transform: none;
}

/* Verification code */
.tra-vcode-section {
    text-align: center;
    padding: 20px 16px 12px;
}

.tra-vcode-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tra-text);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tra-vcode-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--tra-text-dark);
    letter-spacing: 1px;
}

/* QR code */
.tra-qr-wrap {
    text-align: center;
    padding: 16px 20px 20px;
}

.tra-qr-wrap img {
    width: 180px;
    height: 180px;
    display: inline-block;
}

/* Print button */
.tra-print-wrap {
    text-align: center;
    padding: 8px 20px 20px;
}

.tra-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--tra-yellow-btn);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: default;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    font-family: inherit;
}

.tra-print-btn:hover {
    background: var(--tra-yellow-btn);
    color: #000;
}

.tra-print-btn svg {
    width: 18px;
    height: 18px;
}

/* Footer */
.tra-footer {
    text-align: center;
    font-size: 12px;
    color: #78909c;
    padding: 8px 16px 24px;
}

/* Error / search states */
.tra-error {
    text-align: center;
    padding: 40px 24px;
    color: #c62828;
}

.tra-error h2 {
    font-size: 16px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.tra-search {
    padding: 30px 24px;
    text-align: center;
}

.tra-search input {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border: 1px solid var(--tra-border);
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
}

.tra-search button {
    background: var(--tra-yellow-btn);
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

/* Print styles */
@media print {
    .tra-print-wrap,
    .tra-search {
        display: none;
    }

    .tra-header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

@media (max-width: 380px) {
    .tra-header {
        font-size: 11px;
    }

    .tra-seller-name {
        font-size: 13px;
    }

    .tra-items-table tbody td,
    .tra-items-table thead th {
        font-size: 11px;
        padding: 6px 4px;
    }
}
