/* Build Status Tracker Styles */

:root {
    --bst-primary: #6366f1;
    /* Indigo */
    --bst-secondary: #4f46e5;
    --bst-success: #10b981;
    /* Emerald */
    --bst-text-dark: #1f2937;
    --bst-text-light: #6b7280;
    --bst-bg: #ffffff;
    --bst-bg-alt: #f3f4f6;
    --bst-border-radius: 12px;
    --bst-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.bst-container {
    background: var(--bst-bg);
    border-radius: var(--bst-border-radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    max-width: 800px;
    margin: 2rem auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.bst-title {
    font-size: 1.5rem;
    color: var(--bst-text-dark);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

/* Stepper Styles */
.bst-stepper {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.bst-step {
    display: flex;
    align-items: flex-start;
    /* Align top for multiple lines */
    position: relative;
    padding-bottom: 2rem;
}

.bst-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    z-index: 1;
}

.bst-step.completed:not(:last-child)::after {
    background: var(--bst-success);
}

.bst-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bst-bg-alt);
    color: var(--bst-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 2;
    border: 2px solid #e5e7eb;
    margin-right: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bst-step.completed .bst-step-icon {
    background: var(--bst-success);
    border-color: var(--bst-success);
    color: white;
}

.bst-step.active .bst-step-icon {
    background: var(--bst-primary);
    border-color: var(--bst-primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.bst-step-content {
    flex: 1;
    padding-top: 8px;
    /* Align text with icon center */
    display: flex;
    flex-direction: column;
}

.bst-step-label {
    font-size: 1rem;
    color: var(--bst-text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.bst-step.active .bst-step-label {
    color: var(--bst-text-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.bst-step.completed .bst-step-label {
    color: var(--bst-text-dark);
}

/* Active Badge */
.bst-active-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--bst-primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Awaiting Badge */
.bst-awaiting-badge {
    display: inline-flex;
    align-items: center;
    background: #fffbeb;
    color: #d97706;
    /* Amber-600 */
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 4px;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #fcd34d;
}

.bst-awaiting-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* Custom Stage Styling */
.bst-step.custom-stage .bst-step-label {
    font-style: italic;
    color: var(--bst-secondary);
}

/* Sub-tasks Styling */
.bst-step.bst-sub-task {
    margin-left: 2rem !important;
    /* Indent */
}

/* Adjust connector for indentation */
.bst-step.bst-sub-task::before {
    content: '';
    position: absolute;
    left: -20px;
    /* Connect to parent's line */
    top: 20px;
    width: 20px;
    height: 2px;
    background: #e5e7eb;
}

/* Hide main icon for subtasks? Optional. maybe make it smaller. */
.bst-step.bst-sub-task .bst-step-icon {
    width: 30px;
    height: 30px;
    font-size: 0.8em;
}


/* Actions Styles */
.bst-actions {
    margin-top: 3rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 2rem;
    text-align: center;
}

.bst-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.bst-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bst-btn-primary {
    background: var(--bst-primary);
    color: white;
}

.bst-btn-primary:hover {
    background: var(--bst-secondary);
    color: white;
}

.bst-btn-secondary {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--bst-text-dark);
}

.bst-btn-secondary:hover {
    background: var(--bst-bg-alt);
}

.bst-btn .dashicons {
    margin-right: 0.5rem;
}

.bst-cta p {
    margin-bottom: 0.5rem;
    color: var(--bst-text-light);
    font-size: 0.9rem;
}

/* Floating Widget Styles */
.bst-floating-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bst-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    box-shadow: var(--bst-shadow-lg);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bst-floating-btn:hover {
    transform: scale(1.05);
    background: var(--bst-secondary);
}

.bst-floating-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.bst-btn-text {
    font-weight: 600;
    font-size: 1rem;
}

/* Modal Styles */
.bst-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bst-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.bst-modal-content {
    background: white;
    padding: 0;
    /* Container has padding */
    border-radius: var(--bst-border-radius);
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.bst-modal-overlay.open .bst-modal-content {
    transform: translateY(0);
}

.bst-modal-content .bst-container {
    box-shadow: none;
    /* In modal, remove redundant container shadow */
    margin: 0;
    max-width: none;
}

.bst-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
    background: #f3f4f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: all 0.2s;
    z-index: 10;
}

.bst-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Response */
@media (max-width: 640px) {
    .bst-floating-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
    }

    .bst-btn-text {
        font-size: 0.9rem;
    }
}