/* ─────────────────────────────────────────────
   WhatsApp Templates UI
──────────────────────────────────────────── */

:root {
    --wt-green: #25d366;
    --wt-green-dark: #1db954;
    --wt-red: #ef4444;
    --wt-yellow: #f59e0b;
    --wt-gray: #6b7280;
    --wt-bg: #f6f7fb;
}

/* ─────────────────────────────────────────────
   Stats Row
──────────────────────────────────────────── */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.stat-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-card__icon--green {
    background: #e7f7ef;
    color: var(--wt-green);
}

.stat-card__icon--yellow {
    background: #fff7e6;
    color: var(--wt-yellow);
}

.stat-card__icon--red {
    background: #fee2e2;
    color: var(--wt-red);
}

.stat-card__value {
    font-size: 18px;
    font-weight: 700;
    display: block;
}

.stat-card__label {
    font-size: 12px;
    color: var(--wt-gray);
}

/* ─────────────────────────────────────────────
   Data Card Header
──────────────────────────────────────────── */

.data-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

.data-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.data-card__title {
    font-size: 18px;
    font-weight: 700;
}

.data-card__count {
    font-size: 12px;
    color: var(--wt-gray);
}

/* ─────────────────────────────────────────────
   Filters
──────────────────────────────────────────── */

.filter-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    background: #fff;
}

/* ─────────────────────────────────────────────
   View Toggle
──────────────────────────────────────────── */

.view-toggle {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.view-toggle-btn {
    padding: 6px 10px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.view-toggle-btn.active {
    background: var(--wt-green);
    color: #fff;
}

/* ─────────────────────────────────────────────
   GRID VIEW
──────────────────────────────────────────── */

.wt-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.wt-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    overflow: hidden;
    transition: 0.2s;
}

.wt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.wt-card__header-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.wt-card__body {
    padding: 12px;
}

.wt-card__title {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}

.wt-card__meta {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

.badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #333;
}

.wt-card__preview {
    font-size: 12px;
    color: #666;
    margin: 6px 0;
    line-height: 1.4;
}

.wt-card__status {
    font-size: 11px;
    font-weight: 600;
}

/* Status colors */
.wt-status-approved {
    color: var(--wt-green);
}

.wt-status-pending {
    color: var(--wt-yellow);
}

.wt-status-rejected {
    color: var(--wt-red);
}

.wt-status-draft {
    color: var(--wt-gray);
}

.wt-card__actions {
    padding: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}

.wt-card__actions button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--wt-red);
}

/* ─────────────────────────────────────────────
   TABLE VIEW
──────────────────────────────────────────── */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    background: #fafafa;
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   Empty State
──────────────────────────────────────────── */

#wt-empty {
    text-align: center;
    padding: 40px;
    color: var(--wt-gray);
}

/* ─────────────────────────────────────────────
   MODAL
──────────────────────────────────────────── */

.upload-modal__header {
    padding: 14px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upload-modal__body {
    padding: 16px;
}

.upload-modal__footer {
    padding: 14px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ─────────────────────────────────────────────
   Buttons
──────────────────────────────────────────── */

.btn-modal-submit {
    background: var(--wt-green);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-modal-cancel {
    background: #f3f4f6;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
}

@keyframes modalIn {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ───────── CREATE MODAL ───────── */

.wt-create-modal .upload-modal__header {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wt-create-modal .upload-modal__title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.wt-create-modal .upload-modal__subtitle {
    font-size: 12px;
    color: #6b7280;
}

.wt-create-modal .upload-modal__body {
    padding: 18px;
}

.wt-create-modal .upload-modal__footer {
    padding: 14px 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafafa;
}

/* Fields */
.wt-create-modal input,
.wt-create-modal select,
.wt-create-modal textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    outline: none;
}

.wt-create-modal textarea {
    resize: none;
}

/* Header type buttons */
.wt-type-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
}

.wt-type-btn.active {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

/* ─────────────────────────────────────────────
   Responsive
──────────────────────────────────────────── */

@media (max-width: 992px) {
    .wt-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .wt-cards-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
}


/* ─────────────────────────────────────────────
   MODAL CONTAINER
──────────────────────────────────────────── */

/* ───────── DELETE MODAL ───────── */

.wt-delete-modal {
    width: 480px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.18s ease-out;
}

/* header */
.wt-delete-modal .upload-modal__header {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
}

/* icon */
.wt-delete-modal .upload-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* body */
.wt-delete-modal .upload-modal__body {
    padding: 18px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* footer */
.wt-delete-modal .upload-modal__footer {
    padding: 14px 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafafa;
}

/* buttons */
.btn-modal-cancel {
    background: #f3f4f6;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-danger-confirm {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-danger-confirm:hover {
    background: #b91c1c;
}

/* ─────────────────────────────────────────────
   HEADER
──────────────────────────────────────────── */

.wt-delete-modal .upload-modal__header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

/* title group */
.upload-modal__title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* icon */
.wt-delete-modal .upload-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fef2f2;
    color: #dc2626;
}

/* title */
.upload-modal__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

/* subtitle */
.upload-modal__subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 2px 0 0;
}

/* close button */
.upload-modal__close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #6b7280;
}

.upload-modal__close:hover {
    color: #111827;
}

/* ─────────────────────────────────────────────
   BODY
──────────────────────────────────────────── */

.upload-modal__body {
    padding: 20px 22px;
}

.upload-modal__body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
}

#wt-delete-template-name {
    color: #111827;
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────── */

.upload-modal__footer {
    padding: 14px 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafafa;
}

/* cancel */
.btn-modal-cancel {
    background: #f3f4f6;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
    transition: 0.2s;
}

.btn-modal-cancel:hover {
    background: #e5e7eb;
}

/* delete button */
.btn-danger-confirm {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.btn-danger-confirm:hover {
    background: #b91c1c;
}

.btn-danger-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* spinner */
.upload-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ─────────────────────────────────────────────
   ANIMATION
──────────────────────────────────────────── */

@keyframes wtModalPop {
    from {
        transform: scale(0.96);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* ─────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────── */

@media (max-width: 576px) {
    .wt-delete-modal {
        width: 92%;
        border-radius: 14px;
    }

    .upload-modal__body {
        padding: 16px;
    }
}


/* ================================================================
   WhatsApp Templates Page — append to app.css
   ================================================================ */

/* ── stat-card red variant ───────────────────────────────────── */
.stat-card__icon--red {
    background: var(--clr-red-bg);
    color: var(--clr-red-text);
}

/* ── View toggle ─────────────────────────────────────────────── */
.view-toggle {
    display: flex;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-toggle-btn {
    width: 34px;
    height: 34px;
    background: var(--clr-surface-2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-text-muted);
    cursor: pointer;
    font-size: 15px;
    transition: background .12s, color .12s;
}

.view-toggle-btn:not(:last-child) {
    border-right: 1px solid var(--clr-border);
}

.view-toggle-btn.active {
    background: var(--clr-accent);
    color: #fff;
}

.view-toggle-btn:hover:not(.active) {
    background: var(--clr-border);
    color: var(--clr-text-primary);
}

/* ── Templates Grid ──────────────────────────────────────────── */
.wt-grid-view {
    padding: 20px;
}

.wt-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

/* ── Template Card ───────────────────────────────────────────── */
.wt-card {
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-md);
    background: var(--clr-surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    animation: rowSlideIn .3s ease both;
}

.wt-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Card header image area */
.wt-card__header-img {
    width: 100%;
    height: 140px;
    position: relative;
    overflow: hidden;
    background: var(--clr-surface-2);
    flex-shrink: 0;
}

.wt-card__header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder (no image) */
.wt-card__header-img--placeholder {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
}

.wt-card__placeholder-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wt-card__wa-icon {
    font-size: 42px;
    color: rgba(255, 255, 255, .15);
}

.wt-card__header-text-preview {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    text-align: center;
    padding: 0 16px;
    line-height: 1.4;
}

/* Status badge overlay on card */
.wt-card__status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .3));
}

/* Skeleton variant */
.wt-card--skeleton .wt-card__header-img {
    background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

/* Card body */
.wt-card__body {
    padding: 14px 16px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wt-card__name {
    font-size: 13px;
    font-weight: var(--fw-semi);
    color: var(--clr-text-primary);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wt-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wt-card__body-preview {
    font-size: 12.5px;
    color: var(--clr-text-secondary);
    line-height: 1.5;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wt-card__fb-id {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
    margin-top: 4px;
}

.wt-card__fb-id span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Card footer */
.wt-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--clr-border);
    background: var(--clr-surface-2);
}

.wt-card__date {
    font-size: 11.5px;
    color: var(--clr-text-muted);
}

.wt-card__delete-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-text-muted);
    cursor: pointer;
    font-size: 13px;
    transition: background .12s, color .12s, border-color .12s;
}

.wt-card__delete-btn:hover {
    background: var(--clr-red-bg);
    color: var(--clr-red-text);
    border-color: #FECACA;
}

/* ── Category / Language tags ────────────────────────────────── */
.wt-cat-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: var(--fw-semi);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wt-cat-tag--marketing {
    background: #FEF3C7;
    color: #92400E;
}

.wt-cat-tag--utility {
    background: var(--clr-blue-bg);
    color: var(--clr-blue-text);
}

.wt-cat-tag--auth {
    background: var(--clr-purple-bg);
    color: var(--clr-purple-text);
}

.wt-cat-tag--default {
    background: var(--clr-surface-2);
    color: var(--clr-text-muted);
}

.wt-lang-tag {
    display: inline-block;
    padding: 2px 7px;
    background: var(--clr-surface-2);
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--clr-text-secondary);
}

/* ── Table-specific cells ────────────────────────────────────── */
.wt-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wt-name-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: #E7F7EF;
    color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    overflow: hidden;
}

.wt-name-icon--image {
    background: transparent;
}

.wt-template-name {
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    font-family: var(--font-mono);
    color: var(--clr-text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-header-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: var(--fw-medium);
}

.wt-header-type-tag--image {
    background: var(--clr-blue-bg);
    color: var(--clr-blue-text);
}

.wt-header-type-tag--text {
    background: var(--clr-surface-2);
    color: var(--clr-text-secondary);
}

.wt-fb-id-code {
    font-size: 11px;
    font-family: var(--font-mono);
    background: var(--clr-surface-2);
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--clr-text-secondary);
}

/* ── Create Modal wide ───────────────────────────────────────── */
.wt-create-modal {
    max-width: 680px;
}

.wt-modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    scroll-behavior: smooth;
}

.wt-modal-body::-webkit-scrollbar {
    width: 4px;
}

.wt-modal-body::-webkit-scrollbar-thumb {
    background: var(--clr-border);
    border-radius: 4px;
}

/* ── Section labels inside modal ─────────────────────────────── */
.wt-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: var(--fw-semi);
    color: var(--clr-text-secondary);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 10px;
    padding-top: 4px;
}

.wt-section-optional {
    font-size: 11px;
    font-weight: var(--fw-normal);
    color: var(--clr-text-muted);
    text-transform: none;
    letter-spacing: 0;
    background: var(--clr-surface-2);
    border: 1px solid var(--clr-border);
    border-radius: 4px;
    padding: 0 5px;
}

/* ── Header type buttons ─────────────────────────────────────── */
.wt-header-type-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.wt-type-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-sm);
    background: var(--clr-surface-2);
    color: var(--clr-text-secondary);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.wt-type-btn:hover {
    border-color: var(--clr-border-strong);
    color: var(--clr-text-primary);
}

.wt-type-btn--active {
    border-color: var(--clr-accent);
    background: var(--clr-accent-light);
    color: var(--clr-accent);
}

/* ── Text inputs inside modal ────────────────────────────────── */
.wt-text-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    background: var(--clr-surface-2);
    color: var(--clr-text-primary);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.wt-text-input:focus {
    border-color: var(--clr-accent);
    background: var(--clr-surface);
    box-shadow: 0 0 0 3px var(--clr-accent-light);
}

.wt-text-input.is-invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px #FEE2E2;
}

.wt-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    background: var(--clr-surface-2);
    color: var(--clr-text-primary);
    outline: none;
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
    transition: border-color .15s, box-shadow .15s;
}

.wt-textarea:focus {
    border-color: var(--clr-accent);
    background: var(--clr-surface);
    box-shadow: 0 0 0 3px var(--clr-accent-light);
}

.wt-textarea.is-invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px #FEE2E2;
}

/* ── Char counter ────────────────────────────────────────────── */
.wt-char-counter {
    font-size: 11.5px;
    color: var(--clr-text-muted);
    text-align: right;
    margin-top: 4px;
    font-family: var(--font-mono);
}

.wt-vars-detected {
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--clr-text-muted);
}

/* ── Image drop zone inside modal ────────────────────────────── */
.wt-image-drop {
    min-height: 120px;
    margin-bottom: 4px;
}

.wt-image-preview {
    position: relative;
    display: inline-block;
}

.wt-preview-img {
    max-height: 100px;
    max-width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
}

.wt-image-filename {
    font-size: 12px;
    color: var(--clr-text-muted);
    font-family: var(--font-mono);
    margin: 6px 0 0;
    text-align: center;
}

.wt-image-preview .file-preview__remove {
    position: absolute;
    top: -8px;
    right: -8px;
}

/* ── WhatsApp Phone Preview ──────────────────────────────────── */
.wt-phone-preview {
    display: flex;
    justify-content: center;
    margin: 4px 0 8px;
}

.wt-phone-frame {
    width: 100%;
    max-width: 320px;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #E5DDD5;
    /* WA chat bg */
    box-shadow: var(--shadow-md);
}

.wt-phone-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #075E54;
    /* WA dark green */
    color: #fff;
}

.wt-phone-avatar {
    width: 32px;
    height: 32px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.wt-phone-name {
    font-size: 14px;
    font-weight: var(--fw-semi);
}

.wt-phone-chat {
    padding: 12px 10px;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.wt-bubble {
    background: #fff;
    border-radius: 8px 0 8px 8px;
    max-width: 260px;
    min-width: 120px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    overflow: hidden;
}

.wt-bubble-header-img {
    width: 100%;
    max-height: 160px;
    overflow: hidden;
    background: var(--clr-surface-2);
}

.wt-bubble-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wt-bubble-header-text {
    padding: 8px 10px 4px;
    font-size: 14px;
    font-weight: var(--fw-bold);
    color: #111;
    border-bottom: 1px solid #F0F0F0;
    word-break: break-word;
}

.wt-bubble-body {
    padding: 8px 10px 2px;
    font-size: 13.5px;
    color: #111;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.wt-bubble-time {
    text-align: right;
    font-size: 10.5px;
    color: #999;
    padding: 2px 8px 6px;
}

/* ── Delete modal size ───────────────────────────────────────── */
.wt-delete-modal {
    max-width: 440px;
}

/* Danger confirm button */
.btn-danger-confirm {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: #DC2626;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: var(--fw-semi);
    cursor: pointer;
    transition: background .15s;
    box-shadow: 0 2px 6px rgba(220, 38, 38, .3);
}

.btn-danger-confirm:hover:not(:disabled) {
    background: #B91C1C;
}

.btn-danger-confirm:disabled {
    opacity: .65;
    cursor: not-allowed;
}
