/**
 * Onboarding Progress Block Styles
 * 
 * Minimalist, profound, and beautiful with extraordinary typography
 * Author: OS 04/Jan/2025
 */

/* ============================================
   Base Container
   ============================================ */
.wtd-onboarding-progress {
    position: relative;
    background: #fafafa;
    border-radius: 16px;
    padding: 48px;
    margin: 32px auto;  /* Changed to auto for centering */
    max-width: 900px;   /* Add max-width for better centering */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.wtd-onboarding-progress:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Header Section
   ============================================ */
.wtd-onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chevron icon */
.wtd-onboarding-header::after {
    content: '';
    position: absolute;
    right: 120px; /* Position to the right of progress ring */
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.6;
}

.wtd-onboarding-header:hover::after {
    opacity: 1;
}

.wtd-onboarding-progress.collapsed .wtd-onboarding-header::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Smooth slide animation for tasks */
.wtd-onboarding-tasks {
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

.wtd-onboarding-progress.collapsed .wtd-onboarding-tasks {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Compact collapsed header */
.wtd-onboarding-progress.collapsed .wtd-onboarding-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wtd-onboarding-progress.collapsed {
    padding: 20px 32px;
}

/* Smaller progress ring when collapsed */
.wtd-onboarding-progress.collapsed .wtd-progress-ring {
    width: 60px;
    height: 60px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wtd-onboarding-progress.collapsed .wtd-progress-ring .progress-text {
    font-size: 18px;
}

.wtd-onboarding-progress.collapsed .wtd-onboarding-header::after {
    right: 80px; /* Adjust for smaller ring */
}

/* Collapse toggle hint */
.wtd-collapse-hint {
    position: absolute;
    right: 150px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.wtd-onboarding-progress.collapsed .wtd-collapse-hint {
    right: 110px; /* Adjust for smaller ring */
}

.wtd-onboarding-header:hover .wtd-collapse-hint {
    opacity: 1;
}

@media (max-width: 768px) {
    .wtd-collapse-hint {
        display: none;
    }
    
    .wtd-onboarding-header::after {
        right: 100px;
    }
    
    .wtd-onboarding-progress.collapsed .wtd-onboarding-header::after {
        right: 70px;
    }
}

.wtd-onboarding-title {
    flex: 1;
    margin: 0;
}

.wtd-onboarding-title .title-main {
    display: block;
    font-size: 32px;
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.wtd-onboarding-title .title-sub {
    display: block;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #666;
    text-transform: lowercase;
}

/* ============================================
   Progress Ring
   ============================================ */
.wtd-progress-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.wtd-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.wtd-progress-ring .progress-bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.05);
    stroke-width: 6;
}

.wtd-progress-ring .progress-fill {
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Fix for 100% completion */
.wtd-onboarding-progress[data-progress="100"] .progress-fill {
    stroke-dashoffset: 0 !important;
}

.wtd-progress-ring .progress-fill.complete {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
}

.wtd-progress-ring .progress-text {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: -0.02em;
    fill: #1a1a1a;
    transform: rotate(90deg);
    transform-origin: center;
}

/* ============================================
   Task List
   ============================================ */
.wtd-onboarding-tasks {
    display: grid;
    gap: 20px;
}

.wtd-task {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
}

.wtd-task:hover {
    border-color: rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.wtd-task.completed {
    background: rgba(26, 26, 26, 0.02);
    border-color: transparent;
}

.wtd-task.completed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #1a1a1a;
    transform: scaleX(0);
    transform-origin: left;
    animation: completeSlide 0.6s ease-out forwards;
}

@keyframes completeSlide {
    to {
        transform: scaleX(1);
    }
}

/* Task Icon */
.task-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.task-icon svg {
    width: 100%;
    height: 100%;
    stroke: #666;
    transition: all 0.3s ease;
}

.wtd-task.completed .task-icon svg {
    stroke: #1a1a1a;
}

/* Task Content */
.task-content {
    flex: 1;
}

.task-content h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    text-transform: lowercase;
}

.task-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #666;
}

.wtd-task.completed .task-content h4,
.wtd-task.completed .task-content p {
    opacity: 0.7;
}

/* Task Action */
.task-action {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    position: relative;
}

.task-action::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: #1a1a1a;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.task-action:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Optional Task */
.wtd-task.optional {
    background: rgba(0, 0, 0, 0.02);
    border-style: dashed;
}

.optional-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #999;
}

/* ============================================
   Completion Message
   ============================================ */
.wtd-onboarding-complete {
    margin-top: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.02) 0%, rgba(26, 26, 26, 0.05) 100%);
    border-radius: 12px;
    text-align: center;
}

.wtd-onboarding-complete p {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.01em;
    color: #333;
}

/* ============================================
   Login State
   ============================================ */
.wtd-onboarding-login {
    text-align: center;
    padding: 48px;
}

.wtd-onboarding-login h3 {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: -0.02em;
    color: #1a1a1a;
}

.wtd-onboarding-login p {
    margin: 0 0 32px 0;
    font-size: 16px;
    font-weight: 400;
    color: #666;
}

.wtd-login-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.wtd-login-btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .wtd-onboarding-progress {
        padding: 32px 20px;
    }
    
    .wtd-onboarding-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .wtd-onboarding-title .title-main {
        font-size: 24px;
    }
    
    .wtd-progress-ring {
        order: -1;
        width: 100px;
        height: 100px;
    }
    
    .wtd-task {
        padding: 20px;
    }
    
    .task-content h4 {
        font-size: 16px;
    }
}

/* ============================================
   Animation on Page Load
   ============================================ */
.wtd-onboarding-progress {
    animation: fadeInUp 0.8s ease-out;
}

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

.wtd-task {
    animation: slideIn 0.6s ease-out backwards;
}

.wtd-task:nth-child(1) { animation-delay: 0.1s; }
.wtd-task:nth-child(2) { animation-delay: 0.2s; }
.wtd-task:nth-child(3) { animation-delay: 0.3s; }
.wtd-task:nth-child(4) { animation-delay: 0.4s; }
.wtd-task:nth-child(5) { animation-delay: 0.5s; }
.wtd-task:nth-child(6) { animation-delay: 0.6s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
    .wtd-onboarding-progress {
        background: #1a1a1a;
        color: #f0f0f0;
    }
    
    .wtd-onboarding-title .title-main {
        color: #f0f0f0;
    }
    
    .wtd-onboarding-title .title-sub {
        color: #999;
    }
    
    .wtd-task {
        background: #242424;
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    .wtd-task:hover {
        border-color: rgba(255, 255, 255, 0.16);
    }
    
    .wtd-task.completed {
        background: rgba(255, 255, 255, 0.02);
    }
    
    .task-icon svg {
        stroke: #999;
    }
    
    .wtd-task.completed .task-icon svg {
        stroke: #f0f0f0;
    }
    
    .task-content h4 {
        color: #f0f0f0;
    }
    
    .task-content p {
        color: #999;
    }
    
    .task-action {
        color: #f0f0f0;
    }
    
    .wtd-progress-ring .progress-fill {
        stroke: #f0f0f0;
    }
    
    .wtd-progress-ring .progress-text {
        fill: #f0f0f0;
    }
} 