/* Template Detail Page Styles */

.blueprint-bg {
    background-color: #0f172a;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px, 20px 20px;
}

.mermaid {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 300px;
    width: 100%;
    overflow: hidden !important;
    /* Hide scrollbars for pre.mermaid */
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera on pre.mermaid */
.mermaid::-webkit-scrollbar,
pre.mermaid::-webkit-scrollbar {
    display: none !important;
}

/* Override pre tag default styles for mermaid */
pre.mermaid {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.mermaid svg {
    max-width: none !important;
    height: auto !important;
}

/* Mermaid diagram styling */
.mermaid .node rect {
    fill: #1e293b !important;
    stroke: #3b82f6 !important;
    stroke-width: 2px !important;
}

.mermaid .node text { 
    fill: #e0e7ff !important;
    font-size: 14px !important;
}

/* Prevent text wrapping in nodes - force single line */
.mermaid .node foreignObject {
    overflow: visible !important;
}

.mermaid .node .label {
    white-space: nowrap !important;
    display: inline-block !important;
}

.mermaid .nodeLabel {
    white-space: nowrap !important;
}

.mermaid .edgeLabel { 
    background-color: #0f172a !important; 
}

.mermaid .edgeLabel text { 
    fill: #60a5fa !important; 
}

.mermaid .edgePath .path {
    stroke: #3b82f6 !important;
    stroke-width: 2px !important;
    stroke-dasharray: 8, 4 !important;
    animation: flow 30s linear infinite !important;
}

@keyframes flow {
    from { 
        stroke-dashoffset: 0; 
    }
    to { 
        stroke-dashoffset: -12; 
    }
}

/* Mermaid wrapper and container styles */
.mermaid-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    cursor: grab;
    width: 100%;
}

.mermaid-wrapper.dragging {
    cursor: grabbing;
}

.mermaid-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 300px;
    position: relative;
    width: 100%;
    padding: 10px;
    overflow: hidden;
    /* Hide scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.mermaid-container::-webkit-scrollbar {
    display: none;
}

/* Zoom controls */
.zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    padding: 4px;
    z-index: 100;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    color: #93bbfe;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.8);
    color: white;
}

.zoom-level {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #93bbfe;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    justify-content: center;
}

/* Blueprint table styles */
.blueprint-table {
    border-collapse: separate;
    border-spacing: 0;
}

.blueprint-table th.row-label {
    background: #1e293b !important;
    position: sticky;
    left: 0;
    z-index: 10;
}

.blueprint-table td.row-label {
    background: #0f172a;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 2px solid #3b82f6 !important;
}

/* Blueprint style scrollbar */
.blueprint-scroll {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #1e293b;
}

.blueprint-scroll::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.blueprint-scroll::-webkit-scrollbar-track {
    background: #1e293b;
    border: 1px solid #3b82f6;
}

.blueprint-scroll::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 2px;
}

.blueprint-scroll::-webkit-scrollbar-thumb:hover {
    background: #60a5fa;
}

/* Column hover effect for stages table */
.blueprint-table th.stage-column,
.blueprint-table td.stage-column {
    position: relative;
    transition: background-color 0.2s ease;
}

/* Hover state class for column highlighting */
.blueprint-table th.stage-column.column-hover,
.blueprint-table td.stage-column.column-hover {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Fullscreen mode styles */
.fullscreen-table-container {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: #0f172a;
    padding: 2rem;
    overflow: auto;
}

/* Smooth zoom transitions */
.table-zoom-container {
    transition: transform 0.2s ease-out;
}

/* Prose blueprint styles for markdown content */
.prose-blueprint p {
    color: white !important;
}

.prose-blueprint h1,
.prose-blueprint h2,
.prose-blueprint h3,
.prose-blueprint h4,
.prose-blueprint h5,
.prose-blueprint h6 {
    color: white !important;
}

.prose-blueprint strong {
    color: white !important;
    font-weight: bold;
}

.prose-blueprint a {
    color: #60a5fa !important;
}

.prose-blueprint a:hover {
    color: #93c5fd !important;
}

.prose-blueprint ul li,
.prose-blueprint ol li {
    color: white !important;
}

.prose-blueprint code {
    background-color: #374151 !important;
    color: #93c5fd !important;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.prose-blueprint blockquote {
    border-left: 4px solid #3b82f6 !important;
    color: white !important;
    padding-left: 1rem;
    font-style: italic;
}

/* Blueprint theme footer styles */
.blueprint-theme footer h3 {
    color: white !important;
}

.blueprint-theme footer .text-gray-900 {
    color: white !important;
}

.blueprint-theme footer .text-gray-600 {
    color: #93c5fd !important;
}

.blueprint-theme footer .text-gray-600:hover {
    color: white !important;
}

.blueprint-theme footer .bg-light {
    background-color: #0f172a !important;
}

.blueprint-theme footer .border-gray-300 {
    border-color: rgba(59, 130, 246, 0.3) !important;
}

/* Social media icons in blueprint theme */
.blueprint-theme footer .text-gray-600 svg {
    color: #93c5fd !important;
}

.blueprint-theme footer .text-gray-600:hover svg {
    color: white !important;
}

/* Links in footer for blueprint theme */
.blueprint-theme footer a {
    color: #93c5fd !important;
}

.blueprint-theme footer a:hover {
    color: white !important;
}