/* ============================================
   📊 PROGRESS INDICATOR & ENHANCEMENTS
   ============================================ */

/* Progress Indicator */
.signing-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    flex: 1;
    max-width: 120px;
}

.progress-step::after {
    content: "";
    position: absolute;
    top: 15px;
    left: calc(100% + 0.5rem);
    width: calc(100% - 1rem);
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.progress-step:last-child::after {
    display: none;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #ccc;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.step-text {
    font-size: 0.75rem;
    color: #ccc;
    text-align: center;
    transition: color 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border-color: #00ff88;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.progress-step.active .step-text {
    color: #00ff88;
    font-weight: bold;
}

.progress-step.completed .step-number {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
}

.progress-step.completed .step-text {
    color: #ffd700;
}

/* Enhanced Canvas Frame */
.canvas-frame {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.signature-line {
    position: absolute;
    bottom: 40px;
    left: 50px;
    right: 50px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    border-radius: 1px;
}

.signature-label {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: rgba(0, 255, 136, 0.5);
    font-style: italic;
}

/* Signing Tips */
.signing-tips {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.tip {
    font-size: 0.8rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Certificate Enhancements */
.certificate-date {
    font-size: 0.9rem;
    margin: 0 0 1.5rem 0;
    color: #ffd700;
    opacity: 0.8;
}

.certificate-message {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 215, 0, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.certificate-message p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e0e0e0;
    text-align: center;
}

/* Commitment Note */
.commitment-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
}

.commitment-note p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #e0e0e0;
    text-align: center;
}

.commitment-note strong {
    color: #00ff88;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .signing-progress {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .progress-step {
        flex-direction: row;
        max-width: none;
        width: 100%;
        justify-content: flex-start;
        gap: 1rem;
    }

    .progress-step::after {
        display: none;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-text {
        font-size: 0.9rem;
        text-align: left;
    }

    .signing-tips {
        gap: 0.8rem;
    }

    .tip {
        font-size: 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .canvas-frame {
        width: 100%;
        max-width: 100%;
    }

    #signature-canvas {
        width: 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .signing-tips {
        flex-direction: row;
        justify-content: space-around;
        text-align: center;
    }

    .tip {
        flex-direction: column;
        text-align: center;
        gap: 0.3rem;
    }
}

/* Animation for canvas appearance */
.canvas-wrapper {
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success state animations */
.signature-certificate {
    animation: celebrateIn 0.6s ease-out;
}

@keyframes celebrateIn {
    0% {
        opacity: 0;
        transform: scale(0.8) rotateY(15deg);
    }
    50% {
        transform: scale(1.05) rotateY(-5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}
