/* Selector de canal (WhatsApp / SMS) en tarjetas tipo radio. Estilos propios (ui-*) porque el
   estado seleccionado cruza el radio nativo con la tarjeta (`:checked + .card`) y eso Tailwind
   no lo cubre limpio. Modo claro y oscuro. */

.ui-channel-opt {
    display: block;
    cursor: pointer;
}

/* Radio nativo oculto pero enfocable: la selección se pinta sobre la tarjeta hermana. */
.ui-channel-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ui-channel-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 1rem;
    background-color: #ffffff;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.ui-channel-card:hover {
    border-color: #d1d5db;
}

.ui-channel-ic {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
    background-color: #f3f4f6;
    color: #6b7280;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ui-channel-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ui-channel-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
}

.ui-channel-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.ui-channel-dot {
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ui-channel-dot i {
    font-size: 0.6875rem;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Etiqueta "Recomendado" flotando sobre el borde de la tarjeta de WhatsApp. */
.ui-channel-rec {
    position: absolute;
    top: -0.5rem;
    right: 0.875rem;
    font-size: 0.625rem;
    font-weight: 700;
    color: #059669;
    background-color: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

/* Estado seleccionado */
.ui-channel-radio:checked + .ui-channel-card {
    border-color: #ff4500;
    background-color: rgba(255, 69, 0, 0.04);
    box-shadow: 0 6px 18px -8px rgba(255, 69, 0, 0.3);
}

.ui-channel-radio:checked + .ui-channel-card .ui-channel-dot {
    border-color: #ff4500;
    background-color: #ff4500;
}

.ui-channel-radio:checked + .ui-channel-card .ui-channel-dot i {
    opacity: 1;
    transform: scale(1);
}

.ui-channel-radio:checked + .ui-channel-card .ui-channel-ic-wa {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.ui-channel-radio:checked + .ui-channel-card .ui-channel-ic-sms {
    background-color: rgba(255, 69, 0, 0.12);
    color: #ff4500;
}

/* Foco por teclado: anillo de acento sobre la tarjeta. */
.ui-channel-radio:focus-visible + .ui-channel-card {
    border-color: #ff4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.18);
}

/* Dark mode */
:root.dark .ui-channel-card {
    background-color: #242428;
    border-color: #374151;
}

:root.dark .ui-channel-card:hover {
    border-color: #4b5563;
}

:root.dark .ui-channel-ic {
    background-color: #1a1a1e;
    color: #9ca3af;
}

:root.dark .ui-channel-title {
    color: #ffffff;
}

:root.dark .ui-channel-desc {
    color: #9ca3af;
}

:root.dark .ui-channel-dot {
    border-color: #4b5563;
}

:root.dark .ui-channel-rec {
    background-color: #242428;
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}

:root.dark .ui-channel-radio:checked + .ui-channel-card {
    border-color: #ff4500;
    background-color: rgba(255, 69, 0, 0.1);
}

:root.dark .ui-channel-radio:checked + .ui-channel-card .ui-channel-ic-wa {
    background-color: rgba(16, 185, 129, 0.18);
    color: #34d399;
}
