/* ============================================================
   tianDe Vratky a reklamace — Frontend
   ============================================================ */

   .tvr-page-head {
    margin: 0 0 22px;
}

.tvr-page-head h2 {
    margin: 0 0 8px;
    font-size: 34px;
    line-height: 1.15;
    color: #1d2327;
    font-weight: 700;
}

.tvr-page-head p {
    margin: 0;
    color: #646970;
    font-size: 15px;
    line-height: 1.6;
}

.tvr-green {
    color: #2c8a1f;
}

/* Buttons */

.tvr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .18s ease;
}

.tvr-btn-primary {
    background: #54a636;
    border-color: #54a636;
    color: #fff !important;
}

.tvr-btn-primary:hover {
    background: #3f8f29;
    border-color: #3f8f29;
    color: #fff !important;
}

.tvr-btn-outline {
    background: #fff;
    border-color: #54a636;
    color: #218018 !important;
}

.tvr-btn-outline:hover {
    background: #f1fbef;
    color: #16670f !important;
}

.tvr-btn-muted {
    background: #f6f7f7;
    border-color: #dcdcde;
    color: #1d2327 !important;
}

.tvr-btn-muted:hover {
    background: #eef0f1;
    color: #1d2327 !important;
}

.tvr-btn-large {
    min-height: 46px;
    padding: 12px 24px;
    font-size: 15px;
}

/* Alerts */

.tvr-alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0 22px;
    font-size: 14px;
    line-height: 1.6;
}

.tvr-alert-info {
    background: #f1faee;
    border: 1px solid #cfe9c9;
    color: #244d1c;
}

.tvr-alert-warning {
    background: #fff8e5;
    border: 1px solid #f2d17c;
    color: #5f4100;
}

.tvr-alert-error {
    background: #fff2f2;
    border: 1px solid #e0a0a0;
    color: #8a1f1f;
}

/* Generic cards */

.tvr-frontend-box,
.tvr-card,
.tvr-table-card,
.tvr-order-actions {
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,.04);
}

.tvr-frontend-box,
.tvr-card {
    padding: 22px;
    margin-bottom: 20px;
}

.tvr-card h3,
.tvr-frontend-box h3 {
    margin: 0 0 16px;
    font-size: 19px;
    color: #1d2327;
}

/* Forms */

.tvr-form {
    margin: 0;
}

.tvr-form-row {
    margin-bottom: 16px;
}

.tvr-form-row label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #1d2327;
}

.tvr-form-row input[type="text"],
.tvr-form-row input[type="number"],
.tvr-form-row input[type="email"],
.tvr-form-row input[type="file"],
.tvr-form-row select,
.tvr-form-row textarea {
    width: 100%;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: #1d2327;
}

.tvr-form-row input[type="file"] {
    padding: 9px;
}

.tvr-form-row textarea {
    min-height: 120px;
}

.tvr-form-row small {
    display: block;
    margin-top: 6px;
    color: #646970;
}

.tvr-withdrawal-confirmation[hidden],
.tvr-form-feedback[hidden] {
    display: none !important;
}

.tvr-withdrawal-confirmation {
    margin-top: 18px;
}

.tvr-confirm-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    color: #513b00;
    background: #fffbeb;
    border: 1px solid #e8c75d;
    border-radius: 10px;
    cursor: pointer;
}

.tvr-confirm-box input[type="checkbox"] {
    position: static !important;
    display: block !important;
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    margin: 2px 0 0 !important;
    opacity: 1 !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    pointer-events: auto !important;
}

.tvr-confirm-box span,
.tvr-confirm-box strong {
    display: block;
}

.tvr-confirm-box strong {
    margin-bottom: 4px;
    color: #3f2d00;
}

.tvr-form-feedback {
    margin: 0 0 16px;
    padding: 13px 15px;
    border-radius: 9px;
}

.tvr-form-feedback.is-error {
    color: #8a1f1f;
    background: #fff2f2;
    border: 1px solid #e0a0a0;
}

.tvr-request-form.is-submitting {
    cursor: progress;
}

.tvr-request-form.is-submitting .tvr-btn[type="submit"] {
    opacity: .72;
    cursor: wait;
}

/* Order detail buttons */

.tvr-order-actions {
    margin: 24px 0;
    padding: 22px;
}

.tvr-order-actions h3 {
    margin: 0 0 8px;
}

.tvr-order-actions p {
    color: #646970;
}

.tvr-order-actions-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Request form */

.tvr-frontend-form {
    max-width: 980px;
}

.tvr-order-summary-card {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.tvr-order-summary-card > div {
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 28px rgba(0,0,0,.04);
}

.tvr-order-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: #646970;
    font-size: 13px;
}

.tvr-order-summary-card strong {
    font-size: 16px;
    color: #1d2327;
}

/* Product list */

.tvr-product-list {
    display: grid;
    gap: 12px;
}

.tvr-product-item {
    border: 1px solid #e3e6e8;
    border-radius: 12px;
    padding: 16px;
    background: #fbfcfb;
}

.tvr-product-main {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 0 12px;
}

.tvr-product-main input {
    margin-top: 4px;
}

.tvr-product-main strong {
    display: block;
    color: #1d2327;
}

.tvr-product-main small {
    display: block;
    margin-top: 3px;
    color: #646970;
}

.tvr-product-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
}

/* Withdrawal confirmation */

.tvr-confirm-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    background: #fff8e5;
    border: 1px solid #f2d17c;
    border-radius: 12px;
    color: #5f4100;
    font-weight: 600;
}

.tvr-confirm-box input {
    margin-top: 4px;
}

/* Success */

.tvr-frontend-success {
    max-width: 760px;
    padding: 30px;
    border: 1px solid #d7ead0;
    border-radius: 18px;
    background: #f4fbf1;
    text-align: center;
}

.tvr-success-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #54a636;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 12px;
}

/* My returns list */

.tvr-my-returns {
    max-width: 1120px;
}

.tvr-table-card {
    padding: 18px;
    overflow: hidden;
}

.tvr-my-returns-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.tvr-my-returns-table th,
.tvr-my-returns-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eef0f1;
    text-align: left;
    vertical-align: middle;
}

.tvr-my-returns-table th {
    font-weight: 800;
    color: #1d2327;
    background: #fff;
}

.tvr-my-returns-table tr:last-child td {
    border-bottom: none;
}

.tvr-my-returns-table tbody tr:hover {
    background: #fbfcfb;
}

/* Status badges */

.tvr-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.tvr-status-new {
    background: #fff4df;
    color: #a35a00;
    border: 1px solid #f0bd73;
}

.tvr-status-processing {
    background: #e8f3ff;
    color: #0a4b78;
    border: 1px solid #9fd0f3;
}

.tvr-status-waiting_goods {
    background: #f0eaff;
    color: #4b2e83;
    border: 1px solid #c7b8f1;
}

.tvr-status-waiting_customer {
    background: #f6f7f7;
    color: #50575e;
    border: 1px solid #dcdcde;
}

.tvr-status-goods_received,
.tvr-status-refund_approved {
    background: #ecf8ff;
    color: #055d80;
    border: 1px solid #a5d9ef;
}

.tvr-status-resolved {
    background: #e7f7ed;
    color: #146b36;
    border: 1px solid #a8dfbd;
}

.tvr-status-rejected {
    background: #fdecec;
    color: #8a1f1f;
    border: 1px solid #f0b3b3;
}

/* Help line */

.tvr-help-line {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 10px;
    background: #f6fbf4;
    border: 1px solid #cfe9c9;
    color: #355d2f;
}

.tvr-help-line strong {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #54a636;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

/* Empty state */

.tvr-empty-state {
    padding: 32px;
    border: 1px solid #e3e6e8;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.tvr-empty-state h3 {
    margin: 0 0 8px;
}

/* Detail */

.tvr-back-link {
    color: #2c8a1f;
    font-weight: 700;
    text-decoration: none !important;
}

.tvr-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 20px;
}

.tvr-detail-header h2 {
    margin: 0 0 4px;
    font-size: 32px;
}

.tvr-detail-header p {
    margin: 0;
    color: #646970;
}

.tvr-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* Comments */

.tvr-comments {
    display: grid;
    gap: 14px;
}

.tvr-comment {
    padding: 14px;
    background: #fbfcfb;
    border: 1px solid #e3e6e8;
    border-radius: 12px;
}

.tvr-comment-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tvr-comment-head strong {
    color: #1d2327;
}

.tvr-comment-head small {
    color: #646970;
}

.tvr-comment p {
    margin: 0;
    line-height: 1.6;
}

/* Files */

.tvr-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tvr-file-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 8px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    color: #1d2327;
    text-decoration: none !important;
    font-weight: 600;
}

.tvr-file-link:hover {
    background: #eef0f1;
}

/* Timeline */

.tvr-public-timeline {
    position: relative;
    display: grid;
    gap: 16px;
}

.tvr-public-timeline-item {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 12px;
}

.tvr-public-timeline-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 50%;
    background: #54a636;
    box-shadow: 0 0 0 4px #e7f7ed;
}

.tvr-public-timeline-item strong {
    display: block;
    color: #1d2327;
}

.tvr-public-timeline-item small {
    display: block;
    margin-top: 2px;
    color: #646970;
}

.tvr-public-timeline-item p {
    margin: 7px 0 0;
    line-height: 1.55;
    color: #50575e;
}

/* Public lookup */

.tvr-public-lookup {
    max-width: 680px;
}

.tvr-portal-notice {
    margin-bottom: 18px;
}

/* Woo compatibility */

.woocommerce-account .tvr-btn,
.woocommerce .tvr-btn {
    box-shadow: none;
}

.woocommerce-account .tvr-my-returns-table .button,
.woocommerce .tvr-my-returns-table .button {
    white-space: nowrap;
}

/* Responsive */

@media (max-width: 900px) {
    .tvr-order-summary-card,
    .tvr-detail-grid {
        grid-template-columns: 1fr;
    }

    .tvr-product-grid {
        grid-template-columns: 1fr;
    }

    .tvr-detail-header {
        flex-direction: column;
    }

    .tvr-my-returns-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .tvr-page-head h2 {
        font-size: 28px;
    }

    .tvr-frontend-box,
    .tvr-card,
    .tvr-table-card,
    .tvr-order-actions {
        padding: 16px;
        border-radius: 12px;
    }

    .tvr-order-actions-buttons {
        flex-direction: column;
    }

    .tvr-btn {
        width: 100%;
    }

    .tvr-comment-head {
        flex-direction: column;
        gap: 4px;
    }
}
