/* Simple RF Smith Tool - Custom Styles */

/* Base body styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
}

/* Header styling - minimal like fotoventus.cz/elec */
header {
    border-bottom: 1px solid #dee2e6;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 400;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* Section headings */
section h2 {
    color: #2c3e50;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Cards - minimalist approach */
.card {
    border: 1px solid #dee2e6;
    box-shadow: none;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: #adb5bd;
}

.card-title {
    color: #495057;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Form elements */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.form-control:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.1rem rgba(44, 62, 80, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: #2c3e50;
    border-color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
    border-radius: 0.25rem;
}

.btn-primary:hover {
    background-color: #34495e;
    border-color: #34495e;
}

/* Result tables */
.table {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.table td {
    padding: 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table td:first-child {
    width: 40%;
    font-weight: 500;
    color: #495057;
}

/* Alert messages */
.alert {
    border-radius: 0.25rem;
    font-size: 0.9rem;
    border-left: 3px solid;
}

.alert-info {
    background-color: #f8f9fa;
    border-color: #2c3e50;
    color: #495057;
}

.alert-danger {
    background-color: #fff5f5;
    border-color: #dc3545;
}

/* Footer */
footer {
    border-top: 1px solid #dee2e6;
    margin-top: 3rem;
    background-color: #f8f9fa;
}

footer h2 {
    color: #2c3e50;
    font-weight: 600;
}

/* Accordion for formulas */
.accordion-button {
    font-weight: 600;
    color: #2c3e50;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #2c3e50;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #adb5bd;
}

.accordion-body {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-top: none;
}

.accordion-body code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.85rem;
    color: #2c3e50;
    display: inline-block;
    margin: 0.2rem 0;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid #e9ecef;
}

/* Canvas for charts */
canvas {
    max-width: 100%;
    height: auto !important;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 0.5rem;
    background-color: #ffffff;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .card-title {
        font-size: 0.95rem;
    }
}

/* Smooth scrolling for anchors */
html {
    scroll-behavior: smooth;
}


/* Active section highlighting */
section {
    scroll-margin-top: 80px;
    padding-top: 1rem;
}

/* Print adaptations */
@media print {
    footer {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    section {
        page-break-inside: avoid;
    }

    canvas {
        border: 1px solid #000;
    }
}

/* Utility classes */
.text-formula {
    font-family: 'Courier New', Courier, monospace;
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.2rem;
    border: 1px solid #dee2e6;
}

/* Remove default margins for sub/sup in tables */
table sub,
table sup {
    font-size: 0.75em;
    line-height: 0;
}

/* Improve readability of small text */
small,
.small {
    font-size: 0.875rem;
}

/* Separator lines - inspired by fotoventus.cz/elec */
.card-body hr {
    margin: 1rem 0;
    border-top: 1px solid #dee2e6;
}

/* Form groups spacing */
.mb-3:last-of-type {
    margin-bottom: 0 !important;
}


/* Input groups */
.form-check-label {
    font-size: 0.9rem;
    color: #495057;
}

/* Results card enhancement */
#resultsBasic,
#resultsLMatch,
#resultsTLine {
    margin-top: 1rem;
}

/* Minimalist focus states */
.form-check-input:focus {
    border-color: #2c3e50;
    box-shadow: 0 0 0 0.1rem rgba(44, 62, 80, 0.15);
}

/* Chart containers */
.card-body canvas {
    margin-top: 0.5rem;
}
