﻿
/* ==== REDESIGN DO BOTÃO DE HISTÓRICO ==== */
/* Container principal - posicionado dentro da div.container */
.renewal-history-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Botão de histórico - design circular menor */
#toggleRenewalHistory {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4aa0c7 0%, #226677 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(74, 160, 199, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    border-style: solid;
    top: 20px;
}

    #toggleRenewalHistory:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 5px 12px rgba(74, 160, 199, 0.3);
        background: linear-gradient(135deg, #5bb0d7 0%, #336687 100%);
    }

    #toggleRenewalHistory:active {
        transform: translateY(0) scale(0.98);
    }

    /* Efeito de pulso sutil */
    #toggleRenewalHistory::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        border-radius: 50%;
        background: linear-gradient(135deg, #4aa0c7, #226677);
        z-index: -1;
        animation: pulse 3s infinite;
        opacity: 0.6;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.2;
    }

    100% {
        transform: scale(1);
        opacity: 0.6;
    }
}


/* Painel de histórico - tamanho reduzido */
.renewal-history {
    background: linear-gradient(145deg, #0c1821 0%, #1a2a38 100%);
    width: 320px;
    max-height: 260px;
    border: 1px solid #4aa0c7;
    border-radius: 15px 15px 15px 6px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(74, 160, 199, 0.2);
    position: absolute;
    bottom: 65px;
    left: 0;
    transform-origin: bottom left;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 1;
    transform: scale(1);
    backdrop-filter: blur(8px);
}

    .renewal-history.collapsed {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
        pointer-events: none;
    }

    .renewal-history::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 20px;
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid #1a2a38; /* cor do painel */
    }
    .renewal-history::before {
        content: '';
        position: absolute;
        bottom: -9px; /* 1px abaixo da seta principal */
        left: 19px; /* ajusta alinhamento */
        width: 0;
        height: 0;
        border-left: 9px solid transparent;
        border-right: 9px solid transparent;
        border-top: 9px solid #4aa0c7; /* cor da borda */
    }


/* Header do painel */
.rh-header {
    font-weight: 700;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(74, 160, 199, 0.3);
    background: linear-gradient(135deg, #1a2a38 0%, #226677 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px 14px 0 0;
    color: #87cefa;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

    .rh-header i {
        font-size: 16px;
        color: #4aa0c7;
    }

/* Lista do histórico */
.rh-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 200px;
    overflow-y: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: #226677 #0c1821 !important;
}

    .rh-list::-webkit-scrollbar {
        width: 6px;
    }

    .rh-list::-webkit-scrollbar-track {
        background: #0c1821;
        border-radius: 8px;
    }

    .rh-list::-webkit-scrollbar-thumb {
        background: #226677;
        border-radius: 8px;
    }

        .rh-list::-webkit-scrollbar-thumb:hover {
            background: #2A90B6;
        }

    /* Items da lista */
    .rh-list li {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 10px 8px;
        border-bottom: 1px dashed #2a4b60;
        border-radius: 6px;
        margin-bottom: 4px;
        transition: all 0.2s ease;
    }

        .rh-list li:hover {
            background: rgba(74, 160, 199, 0.1);
            transform: translateX(3px);
        }

        .rh-list li:last-child {
            border-bottom: none;
            margin-bottom: 0;
        }

    /* Links dos items */
    .rh-list a {
        font-weight: 600;
        color: #87cefa;
        text-decoration: none;
        transition: color 0.2s;
        font-size: 14px;
        line-height: 1.3;
        margin: .1em 0;
    }

        .rh-list a:hover {
            color: #b0e0e6;
        }

    /* Texto secundário */
    .rh-list small {
        color: #a0b0c0;
        font-size: 0.80em;
    }

/* Estado ativo do botão */
#toggleRenewalHistory[aria-expanded="true"] {
    background: linear-gradient(135deg, #226677 0%, #4aa0c7 100%);
    transform: translateY(-2px) scale(1.05);
}

    #toggleRenewalHistory[aria-expanded="true"]::before {
        animation: none;
        opacity: 0;
    }

.doc a {
    margin: .1em 0;
}