/**
 * ProstupIzolaci.cz - Styly
 * 
 * Tento soubor obsahuje custom CSS nad rámec TailwindCSS.
 * Pro plnou funkčnost je potřeba TailwindCSS z CDN nebo compiled verze.
 */

/* ========================================
   VARIABLES
   ======================================== */
:root {
    --brand-green: #70BFA4;
    --brand-green-dark: #5a9a86;
}

/* ========================================
   ANIMACE
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* ========================================
   ZÁKLADNÍ STYLY
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* ========================================
   BRAND BARVY
   ======================================== */
.bg-brand {
    background-color: var(--brand-green);
}

.text-brand {
    color: var(--brand-green);
}

.border-brand {
    border-color: var(--brand-green);
}

.hover\:bg-brand:hover {
    background-color: var(--brand-green);
}

.hover\:text-brand:hover {
    color: var(--brand-green);
}

.hover\:border-brand:hover {
    border-color: var(--brand-green);
}

/* Focus states */
.focus\:border-brand:focus {
    border-color: var(--brand-green);
}

.focus\:ring-brand\/20:focus {
    --tw-ring-color: rgba(112, 191, 164, 0.2);
}

/* ========================================
   KOMPONENTY
   ======================================== */

/* Spec karty (produkty) */
.spec-card {
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgb(0 0 0 / 0.1);
}

/* Placeholder boxy */
.placeholder-box {
    position: relative;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.placeholder-box::before,
.placeholder-box::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
}

.placeholder-box::before {
    top: 0;
    left: 0;
    border-top: 1px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
}

.placeholder-box::after {
    bottom: 0;
    right: 0;
    border-bottom: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
}

/* ========================================
   KONFIGURÁTOR STYLY
   ======================================== */

/* Canvas */
canvas {
    background-color: white;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Control panel */
.control-panel {
    background-color: #f8fafc;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
}

.control-panel::-webkit-scrollbar {
    width: 4px;
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Badge active */
.badge-active {
    background-color: var(--brand-green);
    color: #000000;
    border: 1px solid #000000;
}

/* 3D Viewer */
#viewer-3d {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
}

/* ========================================
   ANIMACE
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in {
    animation: fadeInUp 0.4s ease-out;
}

/* ========================================
   FAQ DETAILS
   ======================================== */
details summary {
    list-style: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    color: var(--brand-green);
}

details summary:hover {
    color: var(--brand-green-dark);
}

/* ========================================
   MARKDOWN CONTENT STYLING
   ======================================== */

.markdown-content {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #1e293b;
    max-width: none;
}

/* Nadpisy */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.2;
}

.markdown-content h1 {
    font-size: 2.25rem;
    margin-top: 0;
}

.markdown-content h2 {
    font-size: 1.875rem;
    border-bottom: 3px solid var(--brand-green);
    padding-bottom: 0.5rem;
}

.markdown-content h3 {
    font-size: 1.5rem;
    color: #334155;
}

.markdown-content h4 {
    font-size: 1.25rem;
    color: #475569;
}

/* Odstavce */
.markdown-content p {
    margin-bottom: 1.25em;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

/* Odkazy */
.markdown-content a {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    text-decoration: underline;
    color: var(--brand-green-dark);
}

/* Seznamy */
.markdown-content ul,
.markdown-content ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
}

.markdown-content li {
    margin-bottom: 0.5em;
    line-height: 1.75;
}

.markdown-content li > p {
    margin: 0.5em 0;
}

.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Citace (Blockquote) */
.markdown-content blockquote {
    margin: 2em 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 5px solid var(--brand-green);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #166534;
    box-shadow: 0 2px 8px rgba(112, 191, 164, 0.1);
}

.markdown-content blockquote p {
    margin-bottom: 0.5em;
}

.markdown-content blockquote p:first-child {
    font-weight: 700;
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code bloky */
.markdown-content pre {
    margin: 2em 0;
    padding: 1.5rem;
    background: #1e293b;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.markdown-content pre code {
    background: transparent;
    padding: 0;
    font-size: 0.875rem;
    color: #e2e8f0;
    border: none;
}

.markdown-content code {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9em;
    background: #f1f5f9;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    color: #dc2626;
    font-weight: 500;
}

/* Tabulky */
.markdown-content table {
    width: 100%;
    margin: 2em 0;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.markdown-content thead {
    background: linear-gradient(135deg, var(--brand-green) 0%, #5a9a86 100%);
}

.markdown-content thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: white;
}

.markdown-content tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.markdown-content tbody tr:hover {
    background-color: #f8fafc;
}

.markdown-content tbody tr:last-child {
    border-bottom: none;
}

.markdown-content tbody td {
    padding: 1rem 1.25rem;
    color: #475569;
}

/* Horizontální čára */
.markdown-content hr {
    margin: 3em 0;
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-green), transparent);
    border-radius: 2px;
}

/* Obrázky */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2em 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Strong (tučné) */
.markdown-content strong {
    font-weight: 700;
    color: #0f172a;
}

/* Emphasis (kurzíva) */
.markdown-content em {
    font-style: italic;
    color: #334155;
}

/* Del (přeškrtnuté) */
.markdown-content del {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Footnotes (poznámky pod čarou) - ParsedownExtra */
.markdown-content .footnotes {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 2px solid #e2e8f0;
    font-size: 0.9rem;
    color: #64748b;
}

.markdown-content .footnotes hr {
    display: none;
}

.markdown-content .footnotes ol {
    margin-top: 1em;
}

.markdown-content .footnote-ref {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: 700;
}

.markdown-content .footnote-backref {
    color: var(--brand-green);
    text-decoration: none;
    margin-left: 0.25em;
}

/* Definition listy - ParsedownExtra */
.markdown-content dl {
    margin: 2em 0;
}

.markdown-content dt {
    font-weight: 700;
    color: #0f172a;
    margin-top: 1em;
}

.markdown-content dd {
    margin-left: 2em;
    margin-top: 0.5em;
    color: #475569;
}

/* Responsive úpravy */
@media (max-width: 768px) {
    .markdown-content {
        font-size: 1rem;
    }
    
    .markdown-content h1 {
        font-size: 1.875rem;
    }
    
    .markdown-content h2 {
        font-size: 1.5rem;
    }
    
    .markdown-content h3 {
        font-size: 1.25rem;
    }
    
    .markdown-content table {
        font-size: 0.875rem;
    }
    
    .markdown-content thead th,
    .markdown-content tbody td {
        padding: 0.75rem;
    }
    
    .markdown-content pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
    display: none !important;
}

.hairline {
    border-width: 1px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .control-panel {
        max-height: 400px;
    }
    
    #viewer-3d {
        height: 400px;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .spec-card {
        page-break-inside: avoid;
    }
}
