/* ==========================================================================
   Plugin Change — Timeline + Tabs
   ========================================================================== */

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

#plugin-change-timeline-wrapper {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.plugin-change-nav-btn {
    align-self: center;
    height: auto !important;
    line-height: 1 !important;
    padding: 4px 6px !important;
}

.plugin-change-timeline {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    padding: 8px 0 4px;
}

/* Cada etapa */
.plugin-change-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 90px;
    cursor: default;
    padding: 0 4px;
}

.plugin-change-stage[data-stage-id] {
    cursor: pointer;
}

.plugin-change-stage[data-stage-id]:hover .stage-circle {
    filter: brightness(1.15);
    transform: scale(1.08);
}

/* Linha conectora entre etapas */
.stage-connector {
    position: absolute;
    top: 17px;
    left: -50%;
    right: 50%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.stage-connector.active {
    background: var(--main-primary-color);
}

/* Círculo da etapa */
.stage-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border: 3px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

.plugin-change-stage.done .stage-circle {
    background: var(--main-primary-color);
    border-color: var(--main-primary-color);
    color: #fff;
}

.plugin-change-stage.current .stage-circle {
    background: #e85119;
    border-color: #e85119;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(232, 81, 25, 0.2);
}

/* Label da etapa */
.stage-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 8px;
    text-align: center;
    gap: 2px;
    flex: 1;
}

.stage-name {
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
}

.plugin-change-stage.pending .stage-name {
    color: #94a3b8;
}

.stage-desc {
    font-size: 9px;
    color: #64748b;
    line-height: 1.3;
    max-width: 100px;
    display: block;
}

.stage-status-badge {
    font-size: 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1px 6px;
    color: #64748b;
    margin-top: auto;
    min-width: 80px;
    text-align: center;
}

.plugin-change-stage.current .stage-status-badge {
    background: rgba(232, 81, 25, 0.1);
    border-color: rgba(232, 81, 25, 0.3);
    color: #e85119;
}

.plugin-change-stage.done .stage-status-badge {
    background: color-mix(in srgb, var(--main-primary-color) 10%, transparent);
    border-color: color-mix(in srgb, var(--main-primary-color) 30%, transparent);
    color: var(--main-primary-color);
}

/* Feedback visual ao clicar */
.plugin-change-stage.transitioning .stage-circle {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Abas (tabs) Impacto e Lista de Controle
   -------------------------------------------------------------------------- */
.plugin-change-tab-content {
    min-height: 300px;
}

.plugin-change-richtext-view {
    min-height: 200px;
    background: #f8fafc;
    font-size: 14px;
    line-height: 1.6;
}

/* Botão GMUD (impressora) no header */
.plugin-change-gmud-btn {
    color: var(--main-secondary-color) !important;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.plugin-change-gmud-btn:hover {
    color: #fff !important;
    background-color: var(--main-secondary-color) !important;
}

/* --------------------------------------------------------------------------
   Checklist widget (abaixo do TinyMCE nas abas do plugin)
   -------------------------------------------------------------------------- */

.pcc-widget {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #f8fafc;
    margin-bottom: 16px;
    font-size: 13px;
}

.pcc-widget-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #eef2f7;
    border-radius: 0 0 6px 6px;
    font-weight: 600;
    color: #475569;
    cursor: default;
}

.pcc-widget-header .pcc-toggle-btn {
    padding: 0 4px;
    color: #94a3b8;
    line-height: 1;
}

.pcc-widget-body {
    padding: 10px 12px 12px;
}

.pcc-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.pcc-input-row .pcc-text-input {
    flex: 1;
}

.pcc-items-list {
    margin-bottom: 6px !important;
}

.pcc-item-row {
    padding: 3px 0;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.pcc-item-row:last-child {
    border-bottom: none;
}

.pcc-insert-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

/* Oculta as seções "Análise" e "Planos" nativas do GLPI */
.change-plugin-hide-analysis #analysis,
.change-plugin-hide-analysis #analysis-heading,
.change-plugin-hide-analysis #plans,
.change-plugin-hide-analysis #plans-heading {
    display: none !important;
}
