/* ==========================================================================
   Peer Review Workflow Flowchart Styles
   ========================================================================== */

.workflow-flowchart {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px 20px;
    margin: 25px 0;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    position: relative;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Flowchart Steps */
.flowchart-step {
    text-align: center;
    margin: 0 auto;
    max-width: 280px;
    position: relative;
}

.flowchart-step.revision-step {
    background: #fff5f2;
    padding: 12px;
    border-radius: 10px;
    border: 2px dashed #F37039;
}

.flowchart-step.final-step {
    background: linear-gradient(135deg, #002245 0%, #003366 100%);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0, 34, 69, 0.3);
}

.flowchart-step.final-step .step-title,
.flowchart-step.final-step .step-desc {
    color: #fff;
}

/* Step Circle */
.step-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.step-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.25);
}

.step-circle i {
    font-size: 22px;
    color: #fff;
    position: relative;
    z-index: 2;
}

.step-numbers {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: #002245;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 10;
    border: 2px solid #fff;
}

/* Different gradient colors for each step */
.step-1 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.step-2 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.step-3 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.step-4 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.step-5 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.step-6 { background: linear-gradient(135deg, #F37039 0%, #ff8c5a 100%); }
.step-7 { background: linear-gradient(135deg, #002245 0%, #004080 100%); }

/* Step Title and Description */
.step-title {
    color: #002245;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.step-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.3;
    margin: 0;
}

/* Flowchart Arrows */
.flowchart-arrow {
    text-align: center;
    margin: 8px 0;
    position: relative;
}

.flowchart-arrow i {
    font-size: 18px;
    color: #F37039;
    animation: bounce 2s infinite;
}

.flowchart-arrow.final-arrow i {
    color: #002245;
    font-size: 20px;
}

/* Branch Section */
.flowchart-branch {
    margin: 12px 0;
    position: relative;
}

.branch-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.branch-left,
.branch-right {
    text-align: center;
}

.branch-arrow i {
    font-size: 16px;
    color: #dc3545;
    margin-bottom: 6px;
}

.branch-arrow-down i {
    font-size: 18px;
    color: #F37039;
}

.branch-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.branch-label.reject {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
}

.branch-label.accept {
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
}

.branch-label i {
    font-size: 12px;
}

/* Loop Arrow */
.flowchart-loop {
    text-align: center;
    margin: 8px 0;
    position: relative;
}

.loop-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff5f2;
    padding: 6px 15px;
    border-radius: 20px;
    border: 2px dashed #F37039;
    color: #F37039;
    font-weight: 600;
    font-size: 11px;
}

.loop-arrow i {
    font-size: 14px;
    animation: spin 3s linear infinite;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-flowchart {
        padding: 20px 12px;
    }
    
    .step-circle {
        width: 55px;
        height: 55px;
    }
    
    .step-circle i {
        font-size: 20px;
    }
    
    .step-numbers {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .step-title {
        font-size: 13px;
    }
    
    .step-desc {
        font-size: 11px;
    }
    
    .branch-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .branch-left,
    .branch-right {
        display: none;
    }
    
    .flowchart-step.revision-step,
    .flowchart-step.final-step {
        padding: 10px;
    }
    
    .flowchart-arrow {
        margin: 6px 0;
    }
}

@media (max-width: 576px) {
    .step-circle {
        width: 50px;
        height: 50px;
    }
    
    .step-circle i {
        font-size: 18px;
    }
    
    .flowchart-arrow i {
        font-size: 16px;
    }
    
    .loop-arrow {
        padding: 5px 12px;
        font-size: 10px;
    }
    
    .step-title {
        font-size: 12px;
    }
}
