/* ==========================================================================
   Octa Calculator - Fence Calculator Specific Styles
   ========================================================================== */

/* 2-column layout grid for form sections */
.fence-geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 700px) {
    .fence-geo-grid {
        grid-template-columns: 1fr;
    }
}

.presets-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

/* Fence Visualizer Container */
.fence-visualizer-box {
    background-color: var(--color-bg-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    position: relative;
    overflow: visible;
}

.visualizer-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
}

.visualizer-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* SVG Rendering Elements Styles */
.svg-bg {
    fill: #f8fafc;
}

.svg-ground {
    stroke: #16a34a;
    stroke-width: 3;
    stroke-linecap: round;
}

.svg-sub-ground {
    fill: #f1f5f9;
}

.svg-concrete-footing {
    fill: #cbd5e1;
    stroke: #94a3b8;
    stroke-width: 1;
    opacity: 0.85;
}

.svg-fence-post {
    fill: #854d0e; /* Wood default */
    stroke: #451a03;
    stroke-width: 1;
}

.svg-post-cap {
    fill: #451a03;
}

.svg-fence-rail {
    fill: #a16207;
    stroke: #451a03;
    stroke-width: 1;
}

.svg-fence-panel {
    fill: #eab308;
    opacity: 0.15;
    stroke: #ca8a04;
    stroke-width: 1;
}

.svg-fence-picket {
    fill: #ca8a04;
    stroke: #713f12;
    stroke-width: 0.75;
}

.svg-gate-panel {
    fill: #ef4444;
    opacity: 0.15;
    stroke: #dc2626;
    stroke-width: 1.5;
    stroke-dasharray: 3 2;
}

.svg-gate-latch {
    stroke: #dc2626;
    stroke-width: 2;
    fill: none;
}

.svg-arrow-line {
    stroke: #475569;
    stroke-width: 1.5;
    fill: none;
}

.svg-arrow-head {
    fill: #475569;
}

.svg-dim-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    fill: #334155;
    text-anchor: middle;
}

/* Dynamic color modifiers based on fence type */
.svg-post-vinyl { fill: #f8fafc; stroke: #cbd5e1; }
.svg-post-chain { fill: #94a3b8; stroke: #475569; }
.svg-post-aluminum { fill: #1e293b; stroke: #0f172a; }

.svg-picket-vinyl { fill: #f1f5f9; stroke: #cbd5e1; }
.svg-picket-chain { stroke: #94a3b8; stroke-width: 1; fill: none; }
.svg-picket-aluminum { fill: #334155; stroke: #0f172a; }

/* Monospace formula block *//* Transitions */
.mode-panel {
    animation: fadeIn 0.25s ease-in-out;
}

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

/* Print Overrides */
@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
    
    .site-header,
    .breadcrumbs,
    .mobile-nav-toggle,
    .site-footer,
    #fence-form,
    .presets-card-container,
    .btn,
    .educational-content,
    .tooltip-trigger,
    .calc-app-container > div:first-child,
    #btn-copy, #btn-share, #btn-print,
    .result-metric-card::before,
    .fence-visualizer-box {
        display: none !important;
    }
    
    .calc-layout-grid {
        display: block !important;
        width: 100% !important;
    }
    
    .calc-layout-grid > div:last-child {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .result-metric-card {
        border: 1.5px solid #000000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .result-number {
        color: #000000 !important;
        font-size: 1.8rem !important;
    }
    
    body::before {
        content: "Octa Calculator - Fence Materials & Budget Estimation Report\nDate: " attr(data-print-date) "\nURL: https://octacalculator.com/construction/fence-calculator/\n\n";
        white-space: pre-wrap;
        font-weight: bold;
        font-size: 1.2rem;
        display: block;
        margin-bottom: 2rem;
        border-bottom: 2px solid #000000;
        padding-bottom: 0.5rem;
    }
}
