/* ==========================================================
   TARJETA TUDINERITO
   ========================================================== */

.tdtk-card {
    width: 100%;
    max-width: 760px;
    margin: 32px auto;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    box-sizing: border-box;
    color: #263238;
    font-size: 16px;
    line-height: 1.55;
}

.tdtk-card *,
.tdtk-card *::before,
.tdtk-card *::after {
    box-sizing: border-box;
}


/* ==========================================================
   CABECERA
   ========================================================== */

.tdtk-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e8ebee;
}

.tdtk-card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tdtk-card-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
}

.tdtk-card-brand-logo-image {
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}

.tdtk-card-brand-logo-placeholder {
    font-size: 24px;
}

.tdtk-card-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tdtk-card-brand-name {
    display: block;
    color: #17202a;
    font-size: 19px;
    line-height: 1.25;
    font-weight: 700;
}

.tdtk-card-brand-tagline {
    display: block;
    margin-top: 3px;
    color: #6b747c;
    font-size: 13px;
    line-height: 1.3;
}

.tdtk-card-verified {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 6px 11px;
    border-radius: 20px;
    background: #e8f7ed;
    color: #218838;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}


/* ==========================================================
   RECOMPENSA
   ========================================================== */

.tdtk-card-reward {
    margin: 18px 22px 20px;
    padding: 20px;
    background: #fff9df;
    border: 1px solid #f1df9a;
    border-radius: 14px;
    text-align: center;
}

.tdtk-card-reward-label {
    display: block;
    margin-bottom: 4px;
    color: #735b00;
    font-size: 14px;
    font-weight: 600;
}

.tdtk-card-reward-value {
    display: block;
    color: #1f2933;
    font-size: 31px;
    line-height: 1.2;
    font-weight: 800;
}


/* ==========================================================
   INFORMACIÓN PRINCIPAL
   ========================================================== */

.tdtk-card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 22px 18px;
}

.tdtk-card-info-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    background: #f7f9fb;
    border: 1px solid #edf0f2;
    border-radius: 12px;
}

.tdtk-card-info-icon {
    flex: 0 0 auto;
    font-size: 20px;
    line-height: 1.1;
}

.tdtk-card-info-item > div {
    min-width: 0;
}

.tdtk-card-info-label {
    display: block;
    margin-bottom: 2px;
    color: #68737d;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tdtk-card-info-value {
    display: block;
    color: #263238;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}


/* ==========================================================
   LO MEJOR
   ========================================================== */

.tdtk-card-highlight {
    margin: 0 22px 16px;
    padding: 16px 18px;
    background: #eef7ff;
    border-left: 4px solid #1976d2;
    border-radius: 10px;
}

.tdtk-card-highlight .tdtk-card-section-title {
    margin-bottom: 6px;
}


/* ==========================================================
   BLOQUES GENERALES
   ========================================================== */

.tdtk-card-section {
    margin: 0 22px 16px;
    padding: 16px 18px;
    background: #fafbfc;
    border: 1px solid #edf0f2;
    border-radius: 12px;
}

.tdtk-card-section-title {
    margin-bottom: 7px;
    color: #263238;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

.tdtk-card-section-content {
    color: #4f5962;
    font-size: 15px;
    line-height: 1.55;
}


/* ==========================================================
   CÓDIGO PROMOCIONAL
   ========================================================== */

.tdtk-card-code {
    margin: 0 22px 18px;
}

.tdtk-card-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding: 10px;
    background: #f5f6f8;
    border: 1px dashed #c7cdd3;
    border-radius: 10px;
}

.tdtk-card-code-value {
    flex: 1;
    min-width: 0;
    padding: 7px 9px;
    background: #ffffff;
    border-radius: 7px;
    color: #263238;
    font-size: 15px;
    font-family: monospace;
    overflow-wrap: anywhere;
}

.tdtk-copy-button {
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    background: #263238;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tdtk-copy-button:hover {
    opacity: 0.9;
}

.tdtk-copy-button:active {
    transform: scale(0.97);
}


/* ==========================================================
   CÓDIGO POR WHATSAPP
   ========================================================== */

.tdtk-card-whatsapp {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 22px 18px;
    padding: 14px 16px;
    background: #f0faf4;
    border: 1px solid #cfead9;
    border-radius: 12px;
}

.tdtk-card-whatsapp-icon {
    flex: 0 0 auto;
    font-size: 24px;
    line-height: 1;
}

.tdtk-card-whatsapp-content {
    min-width: 0;
    flex: 1;
}

.tdtk-card-whatsapp-title {
    display: block;
    margin-bottom: 2px;
    color: #236b3a;
    font-size: 14px;
    font-weight: 700;
}

.tdtk-card-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #16833b !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
}

.tdtk-card-whatsapp-link:hover {
    color: #10652d !important;
    text-decoration: underline !important;
}


/* ==========================================================
   ÚLTIMO COBRO
   ========================================================== */

.tdtk-card-payment {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 22px 16px;
    padding: 13px 16px;
    background: #f0faf4;
    border: 1px solid #d8eedf;
    border-radius: 12px;
}

.tdtk-card-payment-icon {
    flex: 0 0 auto;
    font-size: 23px;
    line-height: 1;
}

.tdtk-card-payment-content {
    min-width: 0;
}

.tdtk-card-payment-label {
    display: block;
    margin-bottom: 2px;
    color: #5f7165;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tdtk-card-payment-value {
    display: block;
    color: #236b3a;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}


/* ==========================================================
   DESCARGAR LA APP
   ========================================================== */

.tdtk-card-app {
    margin: 0 22px 20px;
}

.tdtk-card-app-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 13px 16px;
    background: #f7f9fb;
    border: 1px solid #e1e6ea;
    border-radius: 12px;
    color: #263238 !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.tdtk-card-app-link:hover {
    background: #eef2f5;
    border-color: #cfd6dc;
    color: #17202a !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

.tdtk-card-app-icon {
    margin-right: 5px;
    font-size: 20px;
}

.tdtk-card-app-arrow {
    margin-left: auto;
    font-size: 19px;
    line-height: 1;
}


/* ==========================================================
   BOTÓN PRINCIPAL
   ========================================================== */

.tdtk-card-action {
    padding: 4px 22px 22px;
}

.tdtk-card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 13px 20px;
    border-radius: 12px;
    background: #1d72d8;
    color: #ffffff !important;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.tdtk-card-button:hover {
    opacity: 0.92;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.tdtk-card-button-arrow {
    font-size: 21px;
    line-height: 1;
}


/* ==========================================================
   PIE
   ========================================================== */

.tdtk-card-footer {
    padding: 13px 22px;
    background: #f7f9fb;
    border-top: 1px solid #e8ebee;
    color: #7b858d;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 600px) {

    .tdtk-card {
        margin: 20px 0;
        border-radius: 14px;
    }

    .tdtk-card-header {
        padding: 15px 16px;
    }

    .tdtk-card-brand {
        gap: 10px;
    }

    .tdtk-card-brand-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .tdtk-card-brand-name {
        font-size: 18px;
    }

    .tdtk-card-brand-tagline {
        font-size: 12px;
    }

    .tdtk-card-verified {
        padding: 4px 8px;
        font-size: 12px;
    }

    .tdtk-card-reward {
        margin-left: 16px;
        margin-right: 16px;
    }

    .tdtk-card-info {
        grid-template-columns: 1fr;
        padding-left: 16px;
        padding-right: 16px;
    }

    .tdtk-card-highlight,
    .tdtk-card-section,
    .tdtk-card-code,
    .tdtk-card-whatsapp,
    .tdtk-card-payment,
    .tdtk-card-app {
        margin-left: 16px;
        margin-right: 16px;
    }

    .tdtk-card-action {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tdtk-card-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .tdtk-card-code-box {
        flex-direction: column;
        align-items: stretch;
    }

    .tdtk-copy-button {
        width: 100%;
    }

    .tdtk-card-whatsapp {
        align-items: flex-start;
    }

    .tdtk-card-app-link {
        padding: 13px 14px;
    }
}


/* ==========================================================
   REDUCCIÓN DE MOVIMIENTO
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .tdtk-card-button,
    .tdtk-copy-button,
    .tdtk-card-app-link {
        transition: none;
    }
}
