/**
 * Storytelling Progress Indicator Styles
 */

.storytelling-progress-container {
    --primary-color: #00796B;
    --secondary-color: #E0F2F1;
    --text-color: #333333;
    --background-color: #F5F5F5;
    
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
    font-family: inherit;
    color: var(--text-color);
}

/* Theme variations */
.storytelling-progress-container.theme-light {
    --primary-color: #00796B;
    --secondary-color: #B2DFDB;
    --text-color: #333333;
    --background-color: #FFFFFF;
}

.storytelling-progress-container.theme-dark {
    --primary-color: #4DB6AC;
    --secondary-color: #004D40;
    --text-color: #FFFFFF;
    --background-color: #263238;
}

.storytelling-progress-container.theme-gradient {
    --primary-color: #00796B;
    --secondary-color: #1E88E5;
    --text-color: #333333;
    --background-color: transparent;
}

/* Progress line */
.progress-line-container {
    position: relative;
    height: 4px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.progress-line-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 4px;
}

.progress-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Milestones */
.milestones-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    top: -28px; /* Position on top of progress line */
}

.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 2;
}

.milestone:hover {
    transform: translateY(-5px);
}

.milestone-shape {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Milestone shapes */
.milestone-shape.circle {
    border-radius: 50%;
}

.milestone-shape.diamond {
    transform: rotate(45deg);
}

.milestone-shape.diamond i,
.milestone-shape.diamond span {
    transform: rotate(-45deg);
}

.milestone-shape.hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Active milestone styles */
.milestone.active .milestone-shape {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.milestone.current .milestone-shape {
    animation: pulse 2s infinite;
}

/* Milestone labels */
.milestone-label {
    font-size: 0.9rem;
    text-align: center;
    max-width: 100px;
    color: var(--text-color);
    transition: color 0.3s ease;
    font-weight: 500;
}

.milestone.active .milestone-label {
    color: var(--primary-color);
    font-weight: bold;
}

/* Content container */
.story-content-container {
    position: relative;
    padding: 1.5rem;
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    min-height: 150px;
}

.milestone-content {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Animation keyframes */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .milestones-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .milestone {
        margin: 10px;
    }
    
    .progress-line-container {
        display: none;
    }
    
    .milestone-shape {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* Add animations for milestone entrance */
.milestone {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger the animation timing of milestones */
.milestone:nth-child(1) { animation-delay: 0.1s; }
.milestone:nth-child(2) { animation-delay: 0.2s; }
.milestone:nth-child(3) { animation-delay: 0.3s; }
.milestone:nth-child(4) { animation-delay: 0.4s; }
.milestone:nth-child(5) { animation-delay: 0.5s; }
.milestone:nth-child(6) { animation-delay: 0.6s; }
.milestone:nth-child(7) { animation-delay: 0.7s; }
.milestone:nth-child(8) { animation-delay: 0.8s; }

/* Navigation buttons for story progression */
.story-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.story-nav-button {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.story-nav-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.story-nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.story-nav-button i {
    margin: 0 5px;
}