/* FAST Framework Layout - Vertical Left Margin Design */

.fast-container {
    min-height: calc(100vh - 50px - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding-top: calc(env(safe-area-inset-top) + 60px); /* More space for vertical breadcrumb */
    position: relative;
    overflow-y: auto; /* Allow smooth scrolling */
    scroll-behavior: smooth;
}

/* Back button in top-left */
.fast-header {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 20px);
    left: 20px;
    right: 20px;
    z-index: 10;
}

.fast-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fast-back-btn:hover,
.fast-back-btn:active {
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
    color: var(--accent-primary);
}

/* Focus Bubble at Top */
.focus-bubble {
    margin-top: 60px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.focus-bubble-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid var(--domain-color, #fbbf24);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--domain-color, #fbbf24) 20%, transparent), 
        color-mix(in srgb, var(--domain-color, #fbbf24) 5%, transparent)
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px color-mix(in srgb, var(--domain-color, #fbbf24) 20%, transparent);
}

.focus-bubble-name {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.focus-bubble-domain {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.focus-full-name {
    font-size: 20px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 8px;
}

.focus-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 300px;
    line-height: 1.4;
}

/* FAST Vertical Layout */
.fast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

/* Each FAST Item */
.fast-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    opacity: 0;
    animation: slideInFromLeft 0.5s ease forwards;
    position: relative;
}

.fast-item:nth-child(1) { animation-delay: 0.1s; }
.fast-item:nth-child(2) { animation-delay: 0.2s; }
.fast-item:nth-child(3) { animation-delay: 0.3s; }
.fast-item:nth-child(4) { animation-delay: 0.4s; }

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

/* FAST Letter Indicator */
.fast-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fast-indicator.active {
    border-color: var(--domain-color, #fbbf24);
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--domain-color, #fbbf24) 20%, transparent),
        color-mix(in srgb, var(--domain-color, #fbbf24) 5%, transparent)
    );
}

.fast-letter {
    font-size: 24px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* FAST Content Block */
.fast-block {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fast-block:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.fast-block.expanded {
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--domain-color, #fbbf24) 10%, transparent),
        color-mix(in srgb, var(--domain-color, #fbbf24) 3%, transparent)
    );
    border-color: color-mix(in srgb, var(--domain-color, #fbbf24) 30%, transparent);
}

.fast-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fast-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fast-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 0;
}

.fast-expanded-content {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    display: none;
}

.fast-block.expanded .fast-expanded-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Connecting Line */
.fast-connection-line {
    position: absolute;
    left: 25px;
    top: 50px;
    bottom: -30px;
    width: 1px;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.05),
        transparent
    );
    pointer-events: none;
}

.fast-item:last-child .fast-connection-line {
    display: none;
}

/* Mobile Adjustments */
@media (max-width: 375px) {
    .focus-bubble-circle {
        width: 130px;
        height: 130px;
    }
    
    .focus-bubble-name {
        font-size: 16px;
    }
    
    .focus-full-name {
        font-size: 18px;
    }
    
    .fast-indicator {
        width: 45px;
        height: 45px;
    }
    
    .fast-letter {
        font-size: 20px;
    }
    
    .fast-title {
        font-size: 15px;
    }
    
    .fast-description {
        font-size: 13px;
    }
}

/* Large phones */
@media (min-width: 414px) {
    .focus-bubble-circle {
        width: 160px;
        height: 160px;
    }
    
    .focus-bubble-name {
        font-size: 20px;
    }
    
    .fast-content {
        max-width: 500px;
    }
}

/* Desktop safety */
@media (min-width: 768px) {
    .fast-container {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .fast-content {
        max-width: 500px;
    }
}

/* Dark overlay when item is expanded */
.fast-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.fast-overlay.active {
    opacity: 1;
    pointer-events: all;
}