/* ============================================
   MULTI-AGENT AI ARCHITECTURE PAGE STYLES
   Extends consulting-styles.css
   ============================================ */

/* Layer Color Palette */
:root {
    --layer1-color: #3b82f6;      /* Blue - Orchestration */
    --layer1-bg: rgba(59, 130, 246, 0.15);
    --layer2-color: #8b5cf6;      /* Purple - Delegation */
    --layer2-bg: rgba(139, 92, 246, 0.15);
    --layer3-color: #06b6d4;      /* Cyan - Execution */
    --layer3-bg: rgba(6, 182, 212, 0.15);
    --layer4-color: #f59e0b;      /* Amber - Infrastructure */
    --layer4-bg: rgba(245, 158, 11, 0.15);
    --primary-green: #00875A;
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.layer-hero {
    background: linear-gradient(135deg, rgba(0, 135, 90, 0.08) 0%, rgba(59, 130, 246, 0.05) 50%, rgba(139, 92, 246, 0.05) 100%);
}

.layer-hero h2 {
    background: linear-gradient(90deg, #00875A, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: #cccccc;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
    font-family: 'Merriweather', serif;
    font-weight: 300;
    line-height: 1.8;
}

.architecture-tagline {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    background: linear-gradient(90deg, var(--layer1-color), var(--layer2-color), var(--layer3-color), var(--layer4-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   LAYER PANEL BUTTONS
   ============================================ */

.layer-panel {
    width: 200px;
    border-color: rgba(59, 130, 246, 0.4);
}

.layer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    position: relative;
    overflow: hidden;
}

.layer-btn .layer-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.layer-btn .preset-btn-title {
    font-size: 0.9rem;
    font-weight: 700;
}

.layer-btn .layer-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Merriweather', serif;
}

/* Layer-specific button colors */
.layer-btn[data-layer="layer1"] {
    border-color: var(--layer1-color);
}
.layer-btn[data-layer="layer1"]:hover,
.layer-btn[data-layer="layer1"].active {
    background: var(--layer1-bg);
    border-color: var(--layer1-color);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}
.layer-btn[data-layer="layer1"].active {
    background: var(--layer1-color);
}
.layer-btn[data-layer="layer1"].active .layer-number {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.layer-btn[data-layer="layer2"] {
    border-color: var(--layer2-color);
}
.layer-btn[data-layer="layer2"]:hover,
.layer-btn[data-layer="layer2"].active {
    background: var(--layer2-bg);
    border-color: var(--layer2-color);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.layer-btn[data-layer="layer2"].active {
    background: var(--layer2-color);
}
.layer-btn[data-layer="layer2"].active .layer-number {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.layer-btn[data-layer="layer3"] {
    border-color: var(--layer3-color);
}
.layer-btn[data-layer="layer3"]:hover,
.layer-btn[data-layer="layer3"].active {
    background: var(--layer3-bg);
    border-color: var(--layer3-color);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.layer-btn[data-layer="layer3"].active {
    background: var(--layer3-color);
}
.layer-btn[data-layer="layer3"].active .layer-number {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.layer-btn[data-layer="layer4"] {
    border-color: var(--layer4-color);
}
.layer-btn[data-layer="layer4"]:hover,
.layer-btn[data-layer="layer4"].active {
    background: var(--layer4-bg);
    border-color: var(--layer4-color);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}
.layer-btn[data-layer="layer4"].active {
    background: var(--layer4-color);
}
.layer-btn[data-layer="layer4"].active .layer-number {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* ============================================
   LAYER INFO PANEL ENHANCEMENTS
   ============================================ */

.layer-info-panel {
    border-color: var(--primary-green);
}

.layer-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.layer-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Merriweather', serif;
    color: #ffffff;
    background: var(--layer1-color);
}

.layer-badge.layer1 { background: var(--layer1-color); }
.layer-badge.layer2 { background: var(--layer2-color); }
.layer-badge.layer3 { background: var(--layer3-color); }
.layer-badge.layer4 { background: var(--layer4-color); }

/* ============================================
   CLAUDE CODE PROMPT SECTION
   ============================================ */

.claude-prompt-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 135, 90, 0.2);
}

.claude-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.claude-prompt-header h5 {
    color: #00875A;
    margin: 0;
    border: none;
    padding: 0;
}

.copy-prompt-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 135, 90, 0.2);
    border: 1px solid rgba(0, 135, 90, 0.4);
    border-radius: 6px;
    color: #00875A;
    font-family: 'Merriweather', serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-prompt-btn:hover {
    background: rgba(0, 135, 90, 0.3);
    border-color: #00875A;
}

.copy-prompt-btn.copied {
    background: #00875A;
    color: #ffffff;
}

.copy-icon {
    font-size: 1rem;
}

.claude-prompt-container {
    background: #0a0a0a;
    border: 1px solid rgba(0, 135, 90, 0.3);
    border-radius: 8px;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

.claude-prompt-container pre {
    margin: 0;
    padding: 1rem;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #00875A;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.claude-prompt-container code {
    font-family: inherit;
}

.prompt-hint {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #888888;
    font-style: italic;
    font-family: 'Merriweather', serif;
}

/* Scrollbar styling for prompt container */
.claude-prompt-container::-webkit-scrollbar {
    width: 8px;
}

.claude-prompt-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.claude-prompt-container::-webkit-scrollbar-thumb {
    background: rgba(0, 135, 90, 0.5);
    border-radius: 4px;
}

.claude-prompt-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 135, 90, 0.7);
}

/* ============================================
   LAYER OVERVIEW CARDS
   ============================================ */

.layer-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.layer-overview-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.layer-overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.layer-overview-card:hover {
    transform: translateY(-5px);
}

/* Layer-specific card styling */
.layer1-card { border-color: rgba(59, 130, 246, 0.3); }
.layer1-card::before { background: var(--layer1-color); }
.layer1-card:hover {
    border-color: var(--layer1-color);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
}
.layer1-card .layer-card-number { background: var(--layer1-color); }

.layer2-card { border-color: rgba(139, 92, 246, 0.3); }
.layer2-card::before { background: var(--layer2-color); }
.layer2-card:hover {
    border-color: var(--layer2-color);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.2);
}
.layer2-card .layer-card-number { background: var(--layer2-color); }

.layer3-card { border-color: rgba(6, 182, 212, 0.3); }
.layer3-card::before { background: var(--layer3-color); }
.layer3-card:hover {
    border-color: var(--layer3-color);
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
}
.layer3-card .layer-card-number { background: var(--layer3-color); }

.layer4-card { border-color: rgba(245, 158, 11, 0.3); }
.layer4-card::before { background: var(--layer4-color); }
.layer4-card:hover {
    border-color: var(--layer4-color);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.2);
}
.layer4-card .layer-card-number { background: var(--layer4-color); }

.layer-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.layer-card-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Merriweather', serif;
    flex-shrink: 0;
}

.layer-card-header h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    margin: 0;
}

.layer-card-subtitle {
    color: #888888;
    font-size: 0.9rem;
    font-family: 'Merriweather', serif;
    font-weight: 300;
    margin-bottom: 1rem;
    padding-left: 52px;
}

.layer-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.layer-card-features li {
    color: #cccccc;
    font-size: 0.85rem;
    font-family: 'Merriweather', serif;
    font-weight: 300;
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.layer-card-features li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 700;
}

.layer-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.layer-card-tech span {
    padding: 0.25rem 0.75rem;
    background: rgba(0, 135, 90, 0.15);
    border: 1px solid rgba(0, 135, 90, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #00875A;
    font-family: 'Merriweather', serif;
    font-weight: 600;
}

/* ============================================
   RELATED SERVICE BANNER
   ============================================ */

.related-service-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid rgba(0, 135, 90, 0.3);
    border-radius: 12px;
}

.related-service-content h3 {
    color: #00875A;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

.related-service-content p {
    color: #cccccc;
    font-size: 0.95rem;
    margin: 0;
    font-family: 'Merriweather', serif;
    font-weight: 300;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
    .layer-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .layer-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .layer-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
    }

    .layer-btn .layer-number {
        position: static;
        width: 28px;
        height: 28px;
        margin-bottom: 0.25rem;
    }

    .layer-overview-grid {
        grid-template-columns: 1fr;
    }

    .layer-card-subtitle {
        padding-left: 0;
    }

    .related-service-banner {
        flex-direction: column;
        text-align: center;
    }

    .claude-prompt-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .copy-prompt-btn {
        width: 100%;
        justify-content: center;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .architecture-tagline {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .layer-btn {
        flex: 1 1 100%;
    }

    .layer-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .layer-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .layer-card-number {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes layerPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 135, 90, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 135, 90, 0.6);
    }
}

.layer-btn.active {
    animation: layerPulse 2s ease-in-out infinite;
}

@keyframes promptHighlight {
    0% {
        background-color: rgba(0, 135, 90, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.claude-prompt-container.highlight {
    animation: promptHighlight 1s ease-out;
}

/* Toast notification for copy */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 135, 90, 0.95);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   LOADING OVERLAY FOR DRAW.IO EDITOR
   ============================================ */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
    border-radius: 12px;
}

.loading-overlay span {
    color: #00875A;
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    font-weight: 600;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 135, 90, 0.2);
    border-top-color: #00875A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Save toast for diagram */
.save-toast {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 135, 90, 0.95);
    color: #ffffff;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-family: 'Merriweather', serif;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 100;
    pointer-events: none;
}

.save-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Custom badge for modified diagrams */
.custom-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #8b5cf6;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Merriweather', serif;
    z-index: 10;
}
