/* ==========================================================================
   WooCommerce Western Union – Frontend Styles
   Design: Refined Financial · Dark-Gold Palette
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --wu-gold:        #FFCC00;
    --wu-gold-dark:   #CC9900;
    --wu-gold-light:  #FFF8DC;
    --wu-ink:         #1A1A2E;
    --wu-ink-mid:     #2D2D44;
    --wu-slate:       #4A4A6A;
    --wu-muted:       #8888AA;
    --wu-surface:     #FFFFFF;
    --wu-border:      #E8E8F0;
    --wu-success:     #00B894;
    --wu-success-bg:  #E8FAF5;
    --wu-error:       #E74C3C;
    --wu-error-bg:    #FDECEA;
    --wu-warn:        #F39C12;
    --wu-warn-bg:     #FEF9EC;
    --wu-info:        #3498DB;
    --wu-info-bg:     #EBF5FB;
    --wu-radius:      12px;
    --wu-radius-sm:   6px;
    --wu-shadow:      0 4px 24px rgba(26,26,46,.08);
    --wu-shadow-lg:   0 12px 48px rgba(26,26,46,.14);
    --wu-font:        'DM Sans', sans-serif;
    --wu-mono:        'DM Mono', monospace;
    --wu-transition:  0.22s cubic-bezier(.4,0,.2,1);
}

/* --------------------------------------------------------------------------
   Wrapper principal
   -------------------------------------------------------------------------- */
.wu-thankyou-wrapper {
    font-family: var(--wu-font);
    color: var(--wu-ink);
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 12px 0 40px;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.wu-card {
    background: var(--wu-surface);
    border: 1px solid var(--wu-border);
    border-radius: var(--wu-radius);
    padding: 28px;
    box-shadow: var(--wu-shadow);
    transition: box-shadow var(--wu-transition);
}

.wu-card:hover {
    box-shadow: var(--wu-shadow-lg);
}

/* Hero card */
.wu-card--hero {
    background: linear-gradient(135deg, var(--wu-ink) 0%, var(--wu-ink-mid) 100%);
    border-color: transparent;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.wu-card--hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255,204,0,.15) 0%, transparent 70%);
    pointer-events: none;
}

.wu-card__icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.wu-card__icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(255,204,0,.4));
}

.wu-card__title,
.wu-card--hero .wu-card__title,
.wu-thankyou-wrapper .wu-card--hero h2,
.wu-thankyou-wrapper .wu-card--hero h2.wu-card__title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

.wu-card__subtitle,
.wu-card--hero .wu-card__subtitle,
.wu-thankyou-wrapper .wu-card--hero p {
    font-size: 14px !important;
    color: rgba(255,255,255,.75) !important;
    -webkit-text-fill-color: rgba(255,255,255,.75) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
}

/* Section title inside cards */
.wu-card__section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wu-slate);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wu-icon {
    font-size: 16px;
}

/* --------------------------------------------------------------------------
   Receiver Grid
   -------------------------------------------------------------------------- */
.wu-receiver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.wu-receiver-item {
    background: var(--wu-gold-light);
    border: 1px solid rgba(255,204,0,.3);
    border-radius: var(--wu-radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wu-receiver-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--wu-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wu-receiver-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--wu-ink);
    font-family: var(--wu-font);
}

.wu-receiver-item--amount {
    background: var(--wu-ink);
    border-color: var(--wu-ink);
    grid-column: 1 / -1;
}

.wu-receiver-item--amount .wu-receiver-label {
    color: rgba(255,255,255,.55);
}

.wu-amount {
    color: var(--wu-gold) !important;
    font-size: 24px !important;
}

/* --------------------------------------------------------------------------
   Instructions
   -------------------------------------------------------------------------- */
.wu-instructions-body {
    font-size: 14px;
    line-height: 1.9;
    color: var(--wu-slate);
    counter-reset: wu-step;
}

.wu-instructions-body br + br,
.wu-instructions-body p {
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Status badge
   -------------------------------------------------------------------------- */
.wu-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--wu-font);
}

.wu-status--pending {
    background: var(--wu-warn-bg);
    color: var(--wu-warn);
    border: 1px solid rgba(243,156,18,.2);
}


.wu-status--reviewing {
    background: var(--wu-info-bg);
    color: var(--wu-info);
    border: 1px solid rgba(52,152,219,.2);
}


.wu-status--confirmed {
    background: var(--wu-success-bg);
    color: var(--wu-success);
    border: 1px solid rgba(0,184,148,.2);
}


.wu-status--rejected {
    background: var(--wu-error-bg);
    color: var(--wu-error);
    border: 1px solid rgba(231,76,60,.2);
}


/* --------------------------------------------------------------------------
   Status messages
   -------------------------------------------------------------------------- */
.wu-status-message {
    margin: 12px 0 0;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--wu-radius-sm);
    font-weight: 500;
}

.wu-status-message--success {
    background: var(--wu-success-bg);
    color: var(--wu-success);
}

.wu-status-message--error {
    background: var(--wu-error-bg);
    color: var(--wu-error);
}

/* --------------------------------------------------------------------------
   Voucher preview
   -------------------------------------------------------------------------- */
.wu-voucher-preview {
    max-width: 100%;
    border-radius: var(--wu-radius-sm);
    border: 1px solid var(--wu-border);
    margin-top: 12px;
    box-shadow: var(--wu-shadow);
}

.wu-voucher-name {
    font-family: var(--wu-mono);
    font-size: 13px;
    color: var(--wu-slate);
    background: var(--wu-gold-light);
    padding: 8px 12px;
    border-radius: var(--wu-radius-sm);
    display: inline-block;
}

/* --------------------------------------------------------------------------
   Upload Form / Dropzone
   -------------------------------------------------------------------------- */
.wu-upload-form {
    font-family: var(--wu-font);
}

.wu-dropzone {
    border: 2px dashed var(--wu-border);
    border-radius: var(--wu-radius);
    transition: border-color var(--wu-transition), background var(--wu-transition);
    cursor: pointer;
}

.wu-dropzone:hover,
.wu-dropzone.wu-drag-over {
    border-color: var(--wu-gold);
    background: var(--wu-gold-light);
}

.wu-dropzone__inner {
    padding: 40px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.wu-dropzone__icon {
    color: var(--wu-muted);
    width: 48px;
    height: 48px;
    transition: color var(--wu-transition);
}

.wu-dropzone:hover .wu-dropzone__icon {
    color: var(--wu-gold-dark);
}

.wu-dropzone__text {
    font-size: 14px;
    color: var(--wu-slate);
    margin: 0;
}

.wu-dropzone__hint {
    font-size: 12px;
    color: var(--wu-muted);
    margin: 0;
}

/* Buttons */
.wu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--wu-radius-sm);
    font-family: var(--wu-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all var(--wu-transition);
    line-height: 1;
}

.wu-button--primary {
    background: var(--wu-gold);
    color: var(--wu-ink);
    border-color: var(--wu-gold);
}

.wu-button--primary:hover {
    background: var(--wu-gold-dark);
    border-color: var(--wu-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,204,0,.4);
    color: var(--wu-ink);
    text-decoration: none;
}

.wu-button--outline {
    background: transparent;
    color: var(--wu-ink);
    border-color: var(--wu-border);
}

.wu-button--outline:hover {
    border-color: var(--wu-gold);
    color: var(--wu-ink);
    text-decoration: none;
}

.wu-button--ghost {
    background: transparent;
    color: var(--wu-muted);
    border-color: transparent;
}

.wu-button--ghost:hover {
    color: var(--wu-slate);
    text-decoration: none;
}

.wu-button--sm {
    padding: 7px 16px;
    font-size: 13px;
}

/* File input hidden */
.wu-hidden { display: none !important; }
.wu-file-input { position: absolute; width: 0; height: 0; opacity: 0; overflow: hidden; }

/* Upload preview */
.wu-upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--wu-gold-light);
    border-radius: var(--wu-radius-sm);
    border: 1px solid rgba(255,204,0,.3);
    margin-top: 12px;
}

.wu-preview-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 14px;
    color: var(--wu-slate);
}

.wu-preview-icon { font-size: 20px; }
.wu-preview-name { font-weight: 600; }

/* Progress */
.wu-upload-progress {
    padding: 20px;
    text-align: center;
    color: var(--wu-slate);
    font-size: 14px;
}

.wu-progress-bar {
    height: 6px;
    background: var(--wu-border);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
}

.wu-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wu-gold), var(--wu-gold-dark));
    border-radius: 100px;
    animation: wu-progress-anim 1.5s ease-in-out infinite;
    width: 60%;
}

@keyframes wu-progress-anim {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* Upload message */
.wu-upload-message {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

.wu-msg--success {
    color: var(--wu-success);
    background: var(--wu-success-bg);
    padding: 10px 14px;
    border-radius: var(--wu-radius-sm);
    display: block;
}

.wu-msg--error {
    color: var(--wu-error);
    background: var(--wu-error-bg);
    padding: 10px 14px;
    border-radius: var(--wu-radius-sm);
    display: block;
}

/* Checkout upload section */
.wu-upload-section {
    margin: 20px 0;
    padding: 24px;
    background: var(--wu-surface);
    border: 2px solid var(--wu-gold);
    border-radius: var(--wu-radius);
}

.wu-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--wu-ink);
    margin: 0 0 8px;
}

.wu-upload-desc {
    font-size: 13px;
    color: var(--wu-muted);
    margin: 0 0 16px;
}

.wu-upload-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wu-ink);
    cursor: pointer;
    padding: 14px 18px;
    border: 2px dashed var(--wu-border);
    border-radius: var(--wu-radius-sm);
    transition: border-color var(--wu-transition);
}

.wu-upload-label:hover {
    border-color: var(--wu-gold);
}

.wu-upload-icon { font-size: 18px; }

.wu-file-preview {
    margin-top: 10px;
}

.wu-file-name {
    font-size: 13px;
    color: var(--wu-slate);
    font-family: var(--wu-mono);
}

/* Status widget */
.wu-status-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wu-status-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wu-slate);
}

/* My orders table */
.wu-my-orders {
    font-family: var(--wu-font);
}

.wu-my-orders__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--wu-ink);
    margin: 0 0 16px;
}

.wu-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wu-orders-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--wu-ink);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wu-orders-table th:first-child { border-radius: 8px 0 0 0; }
.wu-orders-table th:last-child  { border-radius: 0 8px 0 0; }

.wu-orders-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--wu-border);
    color: var(--wu-slate);
    vertical-align: middle;
}

.wu-orders-table tr:hover td {
    background: var(--wu-gold-light);
}

.wu-orders-table a {
    color: var(--wu-ink);
    font-weight: 600;
    text-decoration: none;
}

.wu-orders-table a:hover {
    color: var(--wu-gold-dark);
}

/* Error */
.wu-error {
    color: var(--wu-error);
    background: var(--wu-error-bg);
    padding: 12px 16px;
    border-radius: var(--wu-radius-sm);
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Receiver Selector (Checkout)
   -------------------------------------------------------------------------- */
.wu-receiver-selector {
    margin-top: 14px;
}

.wu-receiver-selector__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--wu-slate);
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wu-receiver-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.wu-receiver-card {
    cursor: pointer;
    display: block;
    position: relative;
}

.wu-receiver-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wu-receiver-card__inner {
    border: 2px solid var(--wu-border);
    border-radius: var(--wu-radius-sm);
    padding: 14px;
    background: var(--wu-surface);
    transition: all var(--wu-transition);
    position: relative;
}

.wu-receiver-card__check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--wu-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all var(--wu-transition);
}

.wu-receiver-card input:checked ~ .wu-receiver-card__inner {
    border-color: var(--wu-gold);
    background: var(--wu-gold-light);
    box-shadow: 0 0 0 3px rgba(255,204,0,.18);
}

.wu-receiver-card input:checked ~ .wu-receiver-card__inner .wu-receiver-card__check {
    background: var(--wu-gold);
    color: var(--wu-ink);
}

.wu-receiver-card:hover .wu-receiver-card__inner {
    border-color: var(--wu-gold-dark);
}

.wu-receiver-card__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--wu-ink);
    margin-bottom: 4px;
    padding-right: 24px;
}

.wu-receiver-card__location {
    font-size: 12px;
    color: var(--wu-muted);
    margin-bottom: 6px;
}

.wu-receiver-card__currency code {
    background: var(--wu-ink);
    color: var(--wu-gold);
    font-family: var(--wu-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

/* Auto-receiver badge */
.wu-checkout-auto-receiver {
    margin-top: 10px;
}

.wu-checkout-receiver-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wu-gold-light);
    border: 1.5px solid rgba(255,204,0,.5);
    border-radius: var(--wu-radius-sm);
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wu-ink);
    box-shadow: 0 2px 8px rgba(255,204,0,.15);
    width: 100%;
}

.wu-checkout-receiver-badge svg {
    flex-shrink: 0;
    color: var(--wu-gold-dark);
}

.wu-checkout-auto-receiver {
    margin-top: 10px;
    width: 100%;
}

.wu-checkout-note {
    font-size: 13px;
    color: var(--wu-muted);
    padding: 10px 14px;
    background: var(--wu-bg);
    border-radius: var(--wu-radius-sm);
    margin-top: 8px;
}

.wu-checkout-note--warn {
    color: var(--wu-warn);
    background: var(--wu-warn-bg);
}

.wu-checkout-description {
    font-size: 13.5px;
    color: var(--wu-slate);
    margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .wu-card--hero {
        flex-direction: column;
        text-align: center;
    }
    .wu-receiver-grid {
        grid-template-columns: 1fr 1fr;
    }
    .wu-receiver-item--amount {
        grid-column: 1 / -1;
    }
    .wu-upload-preview {
        flex-direction: column;
        align-items: flex-start;
    }
    .wu-orders-table { font-size: 12px; }
}

@media (max-width: 400px) {
    .wu-receiver-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Fix: ícono Western Union en el checkout (evitar desbordamiento)
   -------------------------------------------------------------------------- */
.payment_method_western_union img,
.wc_payment_method.payment_method_western_union img,
label[for="payment_method_western_union"] img {
    max-width: 120px !important;
    width: 120px !important;
    height: auto !important;
    vertical-align: middle;
    margin-left: 8px;
    border-radius: 3px;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Animaciones de entrada en thank you page
   -------------------------------------------------------------------------- */
@keyframes wu-fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wu-thankyou-wrapper .wu-card {
    animation: wu-fade-up .4s ease both;
}

.wu-thankyou-wrapper .wu-card:nth-child(1) { animation-delay: .05s; }
.wu-thankyou-wrapper .wu-card:nth-child(2) { animation-delay: .12s; }
.wu-thankyou-wrapper .wu-card:nth-child(3) { animation-delay: .19s; }
.wu-thankyou-wrapper .wu-card:nth-child(4) { animation-delay: .26s; }
.wu-thankyou-wrapper .wu-card:nth-child(5) { animation-delay: .33s; }

/* --------------------------------------------------------------------------
   MEJORAS PRO: Número de paso en instrucciones (auto counter)
   -------------------------------------------------------------------------- */
.wu-card--instructions .wu-instructions-body {
    counter-reset: wu-step;
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Copy al portapapeles en datos del receptor
   -------------------------------------------------------------------------- */
.wu-receiver-value[data-copy] {
    cursor: pointer;
    position: relative;
    transition: opacity .15s;
}

.wu-receiver-value[data-copy]:hover::after {
    content: 'Copiar';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%) translateX(100%);
    background: var(--wu-ink);
    color: #fff;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
    margin-left: 6px;
    font-weight: 600;
    pointer-events: none;
}

.wu-receiver-value.wu-copied::after {
    content: 'Copiado' !important;
    background: var(--wu-success) !important;
}

/* Icono del tooltip de copiar: SVG en data-URI, no emoji. */
.wu-receiver-value[data-copy]::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    margin-right: 5px;
    vertical-align: -2px;
    opacity: .45;
    background-color: currentColor;
    -webkit-mask: var(--wu-icon-copy) center / contain no-repeat;
            mask: var(--wu-icon-copy) center / contain no-repeat;
    transition: opacity .15s;
}

.wu-receiver-value[data-copy]:hover::before { opacity: .9; }

.wu-receiver-value.wu-copied::before {
    opacity: 1;
    -webkit-mask-image: var(--wu-icon-check);
            mask-image: var(--wu-icon-check);
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Receiver cards — efecto selección más elaborado
   -------------------------------------------------------------------------- */
.wu-receiver-card__inner {
    transition: border-color .18s ease, background .18s ease,
                box-shadow .18s ease, transform .15s ease;
}

.wu-receiver-card:hover .wu-receiver-card__inner {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,204,0,.15);
}

.wu-receiver-card input:checked ~ .wu-receiver-card__inner {
    transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Progress bar con gradiente animado más vistoso
   -------------------------------------------------------------------------- */
.wu-progress-fill {
    background: linear-gradient(
        90deg,
        var(--wu-gold-dark) 0%,
        var(--wu-gold) 50%,
        var(--wu-gold-dark) 100%
    );
    background-size: 200% 100%;
    animation: wu-progress-anim 1.2s ease-in-out infinite,
               wu-shimmer 1.5s linear infinite;
}

@keyframes wu-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Status badge con pulse animation cuando está en revisión
   -------------------------------------------------------------------------- */
.wu-status--reviewing {
    position: relative;
}

.wu-status--reviewing::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 100px;
    border: 2px solid var(--wu-info);
    animation: wu-pulse-ring .8s ease-out infinite;
    pointer-events: none;
}

@keyframes wu-pulse-ring {
    0%   { transform: scale(1);    opacity: .6; }
    100% { transform: scale(1.12); opacity: 0; }
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Hero card con patrón de fondo sutil
   -------------------------------------------------------------------------- */
.wu-card--hero {
    background-image:
        linear-gradient(135deg, var(--wu-ink) 0%, var(--wu-ink-mid) 100%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    background-blend-mode: normal;
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Mejora visual del ícono en hero
   -------------------------------------------------------------------------- */
.wu-card__icon svg {
    animation: wu-icon-float 3s ease-in-out infinite;
}

@keyframes wu-icon-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); }
}

/* --------------------------------------------------------------------------
   MEJORAS PRO: Scrollbar personalizado en my-orders
   -------------------------------------------------------------------------- */
.wu-orders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wu-orders-table-wrap::-webkit-scrollbar {
    height: 4px;
}

.wu-orders-table-wrap::-webkit-scrollbar-track {
    background: var(--wu-border);
    border-radius: 100px;
}

.wu-orders-table-wrap::-webkit-scrollbar-thumb {
    background: var(--wu-gold);
    border-radius: 100px;
}

/* ==========================================================================
   v2.0.0 – MEJORAS PRO COMPLETAS
   ========================================================================== */

/* --------------------------------------------------------------------------
   Timeline de estado del pedido
   -------------------------------------------------------------------------- */
.wu-timeline {
    display: flex;
    align-items: center;
    padding: 18px 0 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
}

.wu-timeline__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
}

.wu-timeline__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wu-border);
    background: var(--wu-surface);
    color: var(--wu-muted);
    transition: all .2s ease;
    z-index: 1;
}

.wu-timeline__step--done .wu-timeline__dot {
    background: var(--wu-success);
    border-color: var(--wu-success);
    color: #fff;
}

.wu-timeline__step--current .wu-timeline__dot {
    background: var(--wu-gold);
    border-color: var(--wu-gold);
    color: var(--wu-ink);
    box-shadow: 0 0 0 4px rgba(255,204,0,.2);
}

.wu-timeline__step--rejected .wu-timeline__dot {
    background: var(--wu-error);
    border-color: var(--wu-error);
    color: #fff;
}

.wu-timeline__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wu-muted);
    text-align: center;
    white-space: nowrap;
    letter-spacing: .03em;
}

.wu-timeline__step--done .wu-timeline__label,
.wu-timeline__step--current .wu-timeline__label {
    color: var(--wu-slate);
}

.wu-timeline__step--current .wu-timeline__label {
    color: var(--wu-ink);
    font-weight: 700;
}

.wu-timeline__line {
    flex: 1;
    height: 2px;
    min-width: 24px;
    background: var(--wu-border);
    margin-bottom: 20px;
    transition: background .3s ease;
}

.wu-timeline__line--done {
    background: var(--wu-success);
}

/* --------------------------------------------------------------------------
   Mi Cuenta – Pagos Western Union
   -------------------------------------------------------------------------- */
.wu-account-page {
    font-family: var(--wu-font);
    color: var(--wu-ink);
    max-width: 680px;
}

.wu-account-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--wu-gold);
}

.wu-logo-badge-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--wu-ink);
    color: var(--wu-gold);
    font-family: var(--wu-font);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -1px;
    flex-shrink: 0;
}

.wu-account-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--wu-ink);
    margin: 0 0 3px;
}

.wu-account-subtitle {
    font-size: 13px;
    color: var(--wu-muted);
    margin: 0;
}

.wu-account-empty {
    text-align: center;
    padding: 60px 24px;
    background: var(--wu-surface);
    border: 1px solid var(--wu-border);
    border-radius: var(--wu-radius);
    box-shadow: var(--wu-shadow);
}

.wu-account-empty__icon { font-size: 48px; margin-bottom: 14px; }

.wu-account-orders {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wu-account-order-card {
    background: var(--wu-surface);
    border: 1px solid var(--wu-border);
    border-radius: var(--wu-radius);
    box-shadow: var(--wu-shadow);
    overflow: hidden;
    transition: box-shadow .2s ease;
}

.wu-account-order-card:hover { box-shadow: var(--wu-shadow-lg); }

.wu-account-order-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--wu-ink);
    gap: 12px;
}

.wu-account-order-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wu-account-order-number {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.wu-account-order-date {
    font-size: 12px;
    color: rgba(255,255,255,.55);
}

.wu-account-order-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--wu-gold);
    white-space: nowrap;
}

.wu-account-order-card__body {
    padding: 14px 20px;
    border-bottom: 1px solid var(--wu-border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wu-account-receiver-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    flex: 1;
}

.wu-account-receiver-label {
    color: var(--wu-muted);
    font-weight: 600;
}

.wu-account-receiver-value {
    color: var(--wu-slate);
    font-weight: 500;
}

.wu-account-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wu-account-rejected-note {
    font-size: 12px;
    color: var(--wu-error);
    font-weight: 500;
}

.wu-account-order-card__voucher,
.wu-account-order-card__upload {
    padding: 14px 20px;
}

/* --------------------------------------------------------------------------
   Audit log en metabox admin
   -------------------------------------------------------------------------- */
.wu-audit-log {
    margin-top: 10px;
    max-height: 140px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
}

.wu-audit-entry {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid #f9f9f9;
    font-size: 11px;
}

.wu-audit-entry:last-child { border-bottom: none; }

.wu-audit-action {
    font-weight: 600;
    color: #1d2327;
    flex: 1;
}

.wu-audit-meta {
    color: #8c8f94;
    white-space: nowrap;
    font-size: 10px;
}

/* Notas internas */
.wu-internal-notes-wrap { margin-top: 6px; }

.wu-internal-note {
    background: #fff8dc;
    border-left: 3px solid #FFCC00;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 0 4px 4px 0;
}

.wu-internal-note__meta {
    font-size: 10px;
    color: #8c8f94;
    margin-bottom: 3px;
}

.wu-internal-note__text {
    font-size: 12px;
    color: #1d2327;
    margin: 0;
    line-height: 1.4;
}

.wu-internal-note-form {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.wu-internal-note-form textarea {
    flex: 1;
    height: 52px;
    resize: none;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 6px 8px;
    font-family: -apple-system, sans-serif;
}

.wu-internal-note-form button {
    align-self: flex-end;
    white-space: nowrap;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   RESPONSIVE – Mobile primera prioridad
   -------------------------------------------------------------------------- */

/* Receptor cards: stack vertical en móvil */
@media (max-width: 480px) {
    .wu-receiver-cards {
        grid-template-columns: 1fr;
    }

    .wu-receiver-card__inner {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }

    .wu-receiver-card__check {
        position: static;
        flex-shrink: 0;
        order: -1;
    }

    .wu-receiver-card__name { font-size: 13px; }
    .wu-receiver-card__location { font-size: 11px; margin-bottom: 0; }
}

/* Thank you page hero compacta en móvil */
@media (max-width: 480px) {
    .wu-card--hero {
        padding: 20px;
        gap: 14px;
    }

    .wu-card__icon {
        width: 44px;
        height: 44px;
    }

    .wu-card__title { font-size: 15px; }
    .wu-card__subtitle { font-size: 12px; }

    .wu-receiver-grid {
        grid-template-columns: 1fr;
    }

    .wu-amount { font-size: 20px !important; }

    .wu-thankyou-wrapper {
        padding: 8px 0 24px;
    }

    .wu-card { padding: 18px; }
}

/* Dropzone táctil: ocultar drag & drop en touch, ampliar botón */
@media (hover: none) and (pointer: coarse) {
    .wu-dropzone__text { display: none; }

    .wu-dropzone__inner {
        padding: 24px 16px;
    }

    .wu-upload-trigger {
        min-height: 48px;
        font-size: 15px;
        padding: 12px 28px;
    }

    .wu-dropzone {
        cursor: default;
        border-style: solid;
    }
}

/* Timeline scroll en móvil */
@media (max-width: 520px) {
    .wu-timeline {
        padding: 12px 0 10px;
    }

    .wu-timeline__dot {
        width: 24px;
        height: 24px;
    }

    .wu-timeline__label {
        font-size: 10px;
    }

    .wu-timeline__line {
        min-width: 16px;
    }
}

/* My Account en móvil */
@media (max-width: 480px) {
    .wu-account-order-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }

    .wu-account-order-total {
        font-size: 15px;
    }

    .wu-account-order-card__body {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --------------------------------------------------------------------------
   MEJORA: input captura de cámara en móvil
   -------------------------------------------------------------------------- */
.wu-file-input-mobile {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Dark mode nativo
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --wu-surface:    #1E1E2E;
        --wu-bg:         #16162A;
        --wu-border:     #2D2D4A;
        --wu-ink:        #F0F0FF;
        --wu-ink-mid:    #2D2D44;
        --wu-slate:      #A0A0C0;
        --wu-muted:      #6060A0;
        --wu-gold-light: rgba(255,204,0,.08);
        --wu-shadow:     0 4px 24px rgba(0,0,0,.3);
        --wu-shadow-lg:  0 12px 48px rgba(0,0,0,.4);
    }

    .wu-card {
        background: var(--wu-surface);
        border-color: var(--wu-border);
    }

    .wu-card--hero {
        background: linear-gradient(135deg, #0D0D1A 0%, #1A1A2E 100%);
    }

    .wu-receiver-item {
        background: rgba(255,204,0,.06);
        border-color: rgba(255,204,0,.15);
    }

    .wu-receiver-item--amount {
        background: rgba(255,204,0,.1);
    }

    .wu-dropzone {
        border-color: var(--wu-border);
        background: transparent;
    }

    .wu-dropzone:hover,
    .wu-dropzone.wu-drag-over {
        background: rgba(255,204,0,.05);
    }

    .wu-receiver-card__inner {
        background: var(--wu-surface);
        border-color: var(--wu-border);
    }

    .wu-account-order-card {
        background: var(--wu-surface);
        border-color: var(--wu-border);
    }

    .wu-upload-preview {
        background: rgba(255,204,0,.08);
    }
}

/* --------------------------------------------------------------------------
   Iconos SVG
   --------------------------------------------------------------------------
   Los iconos se imprimen inline desde PHP (WC_WU_Icons) y heredan el color
   con currentColor. Aquí solo van los tamaños, la alineación y los pocos
   casos en los que el icono tiene que ir en CSS (pseudo-elementos), donde se
   usa un SVG en data-URI con mask para poder recolorearlo.
   -------------------------------------------------------------------------- */
:root {
    --wu-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='1.5'/%3E%3Cpath d='M15 6.5V5.5A1.5 1.5 0 0013.5 4h-8A1.5 1.5 0 004 5.5v8A1.5 1.5 0 005.5 15h1'/%3E%3C/svg%3E");
    --wu-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    --wu-icon-globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3.5 9.5h17M3.5 14.5h17'/%3E%3Cpath d='M12 3c2.5 3 2.5 15 0 18-2.5-3-2.5-15 0-18z'/%3E%3C/svg%3E");
}

.wu-svg-icon {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: -0.15em;
}

/* Iconos que acompañan a un texto dentro de un flex */
.wu-status,
.wu-button,
.wu-card__section-title,
.wu-status-message,
.wu-account-order-card__voucher a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wu-card__section-title { gap: 8px; }

.wu-status .wu-svg-icon { opacity: .85; }

.wu-dropzone__icon .wu-svg-icon,
.wu-account-empty__icon .wu-svg-icon {
    opacity: .35;
    stroke-width: 1.6;
}

.wu-card__icon .wu-svg-icon { color: var(--wu-gold, #CC9900); }

.wu-preview-icon { color: var(--wu-ink, #1A1A2E); opacity: .6; }

.wu-receiver-card__check .wu-svg-icon { stroke-width: 3; }

.wu-receiver-card__location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wu-receiver-card__location .wu-svg-icon { opacity: .5; }

/* Enlace del menú de Mi Cuenta (WooCommerce escapa el texto: icono por CSS) */
.woocommerce-MyAccount-navigation-link--western-union-pagos a::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 7px;
    vertical-align: -3px;
    background-color: currentColor;
    -webkit-mask: var(--wu-icon-globe) center / contain no-repeat;
            mask: var(--wu-icon-globe) center / contain no-repeat;
}

.wu-msg--with-icon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.wu-msg__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: inherit;
    font-weight: 700;
}
