/* Base Styles */
body {
    background-color: #1c1c1e;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 1em;
}
a, a:visited, a:hover, a:active {
    margin-top: 0.5em;
    font-style: normal;
    font-size: 1.25em;
    font-weight: bold;
    color: #89CFF0;
}
h1 {
    font-size: 1.5em;
}

/* Container & Layout */
.container {
    background-color: #2c2c2e;
    padding: 1em;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 50px auto 1em;
    max-width: 1200px;
}
.container p {
    text-align: left !important;
}
.container li {
    text-align: left !important;
}

/* Header & Nav */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 2em;
}
.header h1 {
    font-size: 2em;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}
.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1em;
}
.nav a {
    margin: 0 0.75em;
    text-decoration: none;
    color: #89CFF0;
}
.nav a:hover {
    text-decoration: underline;
}
.powered-by-header img {
    height: 1.5em;
    width: auto;
    vertical-align: middle;
}

/* Filter Buttons */
.filter-buttons {
    text-align: center;
    margin-bottom: 1em;
}
.filter-btn {
    background-color: #2c2c2e;
    color: #89CFF0;
    border: none;
    padding: 0.5em 1em;
    margin: 0.25em;
    cursor: pointer;
    font-size: 1.1em;
    border-radius: 4px;
}
.filter-btn:hover,
.filter-btn.active {
    background-color: #48484a;
}

/* Cards */
.card {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    border: none;
    margin-bottom: 1.5rem;
}

/* Donate Button */
.fixed-donate-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    background-color: #89CFF0;
    color: #1c1c1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
    white-space: nowrap;
}
.fixed-donate-btn:hover {
    background-color: #70b8d0;
}

/* Collapsible Sections */
.collapsible {
    background-color: #2c2c2e;
    color: #89CFF0;
    cursor: pointer;
    padding: 0.75em;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 1.25em;
    position: relative;
    margin-top: 1em;
    border-radius: 6px;
}
.collapsible::after {
    content: "▼";
    position: absolute;
    right: 1em;
}
.collapsible:not(.active)::after {
    content: "►";
}
.content {
    padding: 0 1em;
    padding-bottom: 1em;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    background-color: #333;
    border-radius: 6px;
    margin-bottom: 1em;
    max-height: none;
}

/* Favorites Star */
.star-toggle {
    cursor: pointer;
    font-size: 1.2em;
    margin-right: 0.5em;
    user-select: none;
}
.star-toggle.my-favorite {
    color: gold;
}

/* Filter Animations */
.content ul li {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

/* Search Input */
#search-input {
    padding: 0.5em;
    width: 80%;
    max-width: 400px;
    font-size: 1em;
    border: 1px solid #48484a;
    border-radius: 4px;
    background-color: #2c2c2e;
    color: #fff;
}
#search-input::placeholder {
    color: #bbb;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #89CFF0;
    font-size: 2em;
    position: absolute;
    top: 1em;
    right: 1em;
    cursor: pointer;
    transition: transform 0.3s ease; /* 3.2 Animated menu toggle */
}
@media (max-width: 767px) {
    .nav {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .nav.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .nav.active + .menu-toggle { transform: rotate(90deg); } /* 3.2 */
}

/* Responsive Queries */
@media (max-width: 575.98px) {
    body {
        margin: 0;
    }
    .container {
        margin-top: 0;
    }
    a {
        font-size: 1.25em;
    }
    /* 2.2 Full-width form controls on small screens */
    .form-control { width: 100% !important; }
}

/* Quick Wins Touch-spacing */
.filter-btn { margin-bottom: 1rem; } /* 2.3 */
.content ul li { margin-bottom: 0.75rem; } /* 2.3 */

/* Custom Kit Options */
#custom-kit-options {
    background-color: #2c2c2e;
    border: 1px solid #48484a;
    padding: 1em;
    border-radius: 6px;
    margin: 1em auto;
    max-width: 1200px;
}
#custom-kit-options h2 {
    font-size: 1.75em;
    margin-bottom: 0.5em;
}
#custom-kit-options p {
    font-size: 1.1em;
    line-height: 1.6;
}
#custom-kit-options ol {
    margin-left: 1.5em;
}
#custom-kit-options li {
    margin-bottom: 1em;
}

/* Logos */
.powered-by img,
.powered-by-header img {
    height: 1.5em;
    width: auto;
    vertical-align: middle;
}

/* FOOTER – Centered and Matching Site Styles */
.footer.text-center {
    background-color: #2c2c2e;
    padding: 1em;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 50px auto 1em;
    max-width: 1200px;
    text-align: center;
}
.footer.text-center .legal-links {
    margin-bottom: 0.5em;
}
.footer.text-center .legal-links a {
    margin: 0 0.5em;
    color: #89CFF0;
    font-size: 1em;
}
.footer.text-center p {
    margin: 0.5em 0;
    font-size: 1em;
}
.footer.text-center .powered-by {
    margin-top: 0.5em;
}

/* === Calculator & Shared Styles === */
.card-title {
    font-size: 1.25rem;
    font-weight: 600;
}
.badge-info {
    background-color: #17a2b8;
}
.recommended-method {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid #28a745;
    padding: 10px;
}
.result-label {
    font-weight: bold;
    color: #495057; /* Consider adjusting for dark theme if needed */
}
.result-explanation {
    font-style: italic;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Weight Result Emphasis (ClothCalc) */
.weight-result {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Ratio Highlight (ClothCalc) */
.ratio-highlight {
    background-color: rgba(0, 123, 255, 0.1);
    border-left: 4px solid #007bff;
    padding: 10px;
    margin-top: 15px;
}
.ratio-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #007bff;
}

/* Batch Calculator Styles (ClothCalc) */
.layer-card {
    border-left: 4px solid #6c757d;
    margin-bottom: 10px;
    padding: 10px;
    background-color: rgba(108, 117, 125, 0.05);
}
.layer-card.active {
    border-left-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
}
.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.layer-title {
    font-weight: 600;
    margin: 0;
}
.layer-actions {
    display: flex;
    gap: 5px;
}
.batch-totals {
    background-color: rgba(52, 58, 64, 0.1);
    border-left: 4px solid #343a40;
    padding: 15px;
    margin-top: 20px;
}
.calculator-mode-toggle {
    margin-bottom: 20px;
}
.calculator-mode-toggle .btn {
    width: 50%;
}
.calculator-mode-toggle .btn.active {
    font-weight: bold;
}
.batch-layer-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Affiliate Links Section (Shared) */
#affiliateLinksContainer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #48484a;
}
#affiliateLinksContainer h6 {
    font-weight: bold;
    margin-bottom: 0.5rem;
}
#affiliateLinksContainer ul {
    list-style: none;
    padding-left: 0;
}
#affiliateLinksContainer li {
    margin-bottom: 0.25rem;
}
.affiliate-disclosure-inline {
    font-size: 0.8em;
    color: #adb5bd;
    display: block;
    margin-top: 0.5rem;
}

/* Donation Modal Customizations */
.modal-content-custom {
    background-color: #2c2c2e;
    color: #ffffff;
    border: none;
}
.modal-header-custom {
    border-bottom: 1px solid #48484a;
}
.modal-footer-custom {
    border-top: 1px solid #48484a;
}

/* Print Styles */
.no-print {
    display: none !important;
}
.d-print-block {
    display: none;
}
@media print {
    .no-print {
        display: none !important;
    }
    .d-print-block {
        display: block !important;
    }
    body {
        margin: 0;
        padding: 0;
    }
    h1, h2 {
        font-size: 20pt;
    }
    p, li {
        font-size: 12pt;
    }
    .weight-result, .ratio-value {
        font-size: 16pt;
        font-weight: bold;
    }
}


