/**
 * Plugin Uwhatsapp - Estilos
 *
 * @author    Unitá Soluções Digitais
 * @copyright Copyright (C) 2026 by Unitá Soluções Digitais
 * @license   Commercial
 */

.uwhatsapp-badge {
    background-color: #25D366;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.uwhatsapp-message-inbound {
    background-color: #E8F5E9;
    border-left: 4px solid #25D366;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
}

.uwhatsapp-message-outbound {
    background-color: #E3F2FD;
    border-left: 4px solid #2196F3;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
}

.uwhatsapp-media-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

.uwhatsapp-config-section {
    background: #f8f9fa;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.uwhatsapp-webhook-url {
    background: #fff;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    word-break: break-all;
}

.uwhatsapp-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.uwhatsapp-status-indicator.active {
    background-color: #25D366;
}

.uwhatsapp-status-indicator.inactive {
    background-color: #dc3545;
}

.actor_entry .uwhatsapp-template-btn {
    align-items: center;
    color: #25d366;
    display: inline-flex;
    justify-content: center;
    margin-left: 2px;
    padding-left: 6px;
    padding-right: 6px;
}

.actor_entry .uwhatsapp-template-btn .fa-whatsapp {
    font-size: 1.05rem;
    line-height: 1;
}

.actor_entry .uwhatsapp-template-btn:hover,
.actor_entry .uwhatsapp-template-btn:focus {
    background-color: rgba(37, 211, 102, 0.12);
    color: #128c4a;
}

.uwh-sender-options {
    display: grid;
    gap: 8px;
}

.uwh-sender-option {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee3;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    color: #1f2937;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 10px 12px;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
    width: 100%;
}

.uwh-sender-option:hover {
    background: #f8fafc;
    border-color: #9fd7b6;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.12);
}

.uwh-sender-option.active {
    background: #ecfdf3;
    border-color: #25d366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.18);
}

.uwh-sender-name {
    font-weight: 600;
}

.uwh-sender-limit {
    align-self: center;
    background: #e2e8f0;
    border-radius: 999px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    grid-column: 2;
    padding: 3px 8px;
}

.uwhatsapp-config-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 12px auto 0;
    max-width: 950px;
}

.uwhatsapp-config-tab {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee3;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    font-weight: 600;
    gap: 6px;
    padding: 9px 14px;
}

.uwhatsapp-config-tab:hover,
.uwhatsapp-config-tab:focus {
    background: #f8fafc;
    color: #1f2937;
    outline: none;
}

.uwhatsapp-config-tab.active {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.uwhatsapp-tab-row.uwhatsapp-tab-hidden {
    display: none;
}

.uwhatsapp-flow-panel {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.uwhatsapp-subflows {
    border-left: 3px solid var(--main-primary-color, #25d366);
    display: grid;
    gap: 8px;
    margin: -2px 0 8px 20px;
    padding-left: 12px;
}

.uwhatsapp-switch-card {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dee3;
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 1fr;
    padding: 12px 14px;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.uwhatsapp-switch-card:hover,
.uwhatsapp-switch-card:focus-within {
    background: #f8fafc;
    border-color: var(--main-primary-color, #25d366);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.12);
}

.uwhatsapp-switch-card-child {
    background: #fbfdff;
    padding: 10px 12px;
}

.uwhatsapp-switch-card input[type='checkbox'] {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.uwhatsapp-switch-visual {
    background: #cbd5e1;
    border-radius: 999px;
    display: inline-block;
    height: 24px;
    position: relative;
    transition: background 120ms ease;
    width: 44px;
}

.uwhatsapp-switch-visual::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
    content: '';
    height: 18px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform 120ms ease;
    width: 18px;
}

.uwhatsapp-switch-card input[type='checkbox']:checked + .uwhatsapp-switch-visual {
    background: var(--main-primary-color, #25d366);
}

.uwhatsapp-switch-card input[type='checkbox']:checked + .uwhatsapp-switch-visual::after {
    transform: translateX(20px);
}

.uwhatsapp-switch-copy {
    display: grid;
    gap: 3px;
}

.uwhatsapp-switch-title {
    color: #1f2937;
    font-weight: 700;
}

.uwhatsapp-switch-title i {
    color: var(--main-primary-color, #25d366);
    margin-right: 6px;
}

.uwhatsapp-switch-copy small {
    color: #64748b;
    line-height: 1.35;
}

@media (max-width: 700px) {
    .uwhatsapp-config-tabs {
        display: grid;
    }

    .uwhatsapp-config-tab {
        border: 1px solid #d9dee3;
        border-radius: 8px;
        justify-content: center;
        width: 100%;
    }

    .uwhatsapp-subflows {
        margin-left: 8px;
    }

    .uwhatsapp-switch-card {
        align-items: start;
    }
}
