/* CSS Variables for Theme Support */
:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --secondary-color: #6c757d;
    --background: #ffffff;
    --surface: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --card-background: #ffffff;
    --nav-background: #ffffff;
    --footer-background: #2c3e50;
    --footer-text: #ecf0f1;
}

/* Dark Mode Variables */
body.dark-mode {
    --background: #1a1a1a;
    --surface: #2d2d2d;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --card-background: #2d2d2d;
    --nav-background: #252525;
    --footer-background: #1a1a1a;
    --footer-text: #e0e0e0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--nav-background);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-brand a:hover {
    color: var(--primary-hover);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background-color: var(--surface);
    transform: scale(1.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: white;
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Tools Section */
.tools-section {
    padding: 60px 20px;
    background-color: var(--background);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.tools-controls {
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    background-color: var(--card-background);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow-hover);
}

.tool-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.tool-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.tool-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--surface);
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.tool-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.tool-link:hover {
    background-color: var(--primary-hover);
    transform: translateX(5px);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-section {
    padding: 60px 20px;
    background-color: var(--surface);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    background-color: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Pure HTML <details> support - NO JavaScript required */
details.faq-item {
    display: block;
}

details.faq-item summary {
    list-style: none;
    width: 100%;
    padding: 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item summary::marker {
    display: none;
}

details.faq-item summary:hover {
    background-color: var(--surface);
}

details.faq-item[open] summary,
details.faq-item.is-open summary {
    background-color: var(--surface);
}

/* Prevent native details content from showing */
details.faq-item:not(.is-open) > *:not(summary) {
    display: block !important;
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: var(--surface);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Rotate icon when details is open */
details.faq-item[open] .faq-icon,
.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* FAQ Answer - Base styles for native details behavior */
.faq-answer {
    padding: 0 1.25rem 1.25rem;
    display: block;
}

/* Native details behavior - show answer when details is open */
details.faq-item[open] .faq-answer {
    display: block;
    padding: 0 1.25rem 1.25rem;
}

/* Hide answer when details is closed (native behavior) */
details.faq-item:not([open]) .faq-answer {
    display: none;
}

/* Make summary clickable */
details.faq-item summary {
    cursor: pointer;
}

/* Rotate icon when details is open */
details.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

/* Support for div-based FAQ items (JavaScript controlled) - keep existing behavior */
.faq-item:not(details).active .faq-answer,
.faq-item:not(details).is-open .faq-answer {
    display: block;
    padding: 0 1.25rem 1.25rem;
    max-height: 2000px;
}

.faq-item:not(details) .faq-answer {
    display: none;
    transition: max-height 0.4s ease, padding 0.3s ease;
    overflow: hidden;
    max-height: 0;
    padding: 0 1.25rem;
}

.faq-item:not(details).is-open .faq-icon,
.faq-item:not(details).active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--footer-background);
    color: var(--footer-text);
    padding: 40px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: var(--footer-text);
    opacity: 0.9;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Page Content Styles (for About, Contact, etc.) */
.page-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.page-content ul,
.page-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--card-background);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-background);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 20px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .tools-section,
    .faq-section {
        padding: 40px 20px;
    }
}

/* Tool Page Styles */
.tool-page {
    padding: 40px 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.tool-calculator {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
}

.tool-calculator h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group-tool {
    display: flex;
    flex-direction: column;
}

.form-group-tool label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group-tool input,
.form-group-tool select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--card-background);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.form-group-tool input:focus,
.form-group-tool select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group-tool input.error {
    border-color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.unit-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.unit-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--text-primary);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.unit-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calculate-btn {
    padding: 14px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.calculate-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.results-container {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    display: none;
}

.results-container.show {
    display: block;
}

.results-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--text-primary);
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-category {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 1rem;
}

.result-category.underweight {
    background-color: #e3f2fd;
    color: #1976d2;
}

.result-category.normal {
    background-color: #e8f5e9;
    color: #388e3c;
}

.result-category.overweight {
    background-color: #fff3e0;
    color: #f57c00;
}

.result-category.obese {
    background-color: #ffebee;
    color: #d32f2f;
}

.dark-mode .result-category.underweight {
    background-color: #1e3a5f;
    color: #90caf9;
}

.dark-mode .result-category.normal {
    background-color: #1b5e20;
    color: #81c784;
}

.dark-mode .result-category.overweight {
    background-color: #e65100;
    color: #ffb74d;
}

.dark-mode .result-category.obese {
    background-color: #b71c1c;
    color: #ef5350;
}

.how-it-works {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
}

.how-it-works h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.how-it-works p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tool-faq {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
}

.tool-faq h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.related-tools {
    background-color: var(--card-background);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
}

.related-tools h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.related-tools-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-tool-link {
    display: block;
    padding: 1rem;
    background-color: var(--surface);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-tool-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Invoice Generator Specific Styles */
.invoice-items {
    margin: 1.5rem 0;
}

.invoice-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.remove-item-btn {
    padding: 8px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background-color: #c82333;
}

.add-item-btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.add-item-btn:hover {
    background-color: #5a6268;
}

.invoice-summary {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.invoice-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.invoice-summary-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    margin-top: 1rem;
}

.print-btn {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.print-btn:hover {
    background-color: var(--primary-hover);
}

.copy-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.copy-btn:hover {
    background-color: var(--primary-hover);
}

.copy-btn.copied {
    background-color: #28a745;
}

.prompt-output {
    background-color: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 200px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.calculate-btn.processing {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Results Header */
.results-header {
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    animation: fadeIn 0.5s ease-in;
}

/* Fade-in Animation */
.results-container {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}

.results-container.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip Styles */
.tooltip-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    vertical-align: middle;
    position: relative;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: var(--text-primary);
    color: var(--background);
    border-radius: 5px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    box-shadow: 0 2px 8px var(--shadow);
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-primary);
    margin-bottom: -5px;
}

/* Currency Selector */
.currency-selector {
    position: relative;
}

.currency-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--card-background);
    color: var(--text-primary);
}

.currency-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.currency-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--card-background);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    display: none;
}

.currency-dropdown.show {
    display: block;
}

.currency-option {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.currency-option:hover,
.currency-option.highlighted {
    background-color: var(--surface);
}

.currency-option:last-child {
    border-bottom: none;
}

/* Tone Selector */
.tone-selector {
    position: relative;
}

.tone-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--card-background);
    color: var(--text-primary);
    cursor: pointer;
}

.tone-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.tone-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--card-background);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px var(--shadow);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.tone-dropdown.show {
    display: block;
}

.tone-group {
    margin-bottom: 0.5rem;
}

.tone-group-header {
    padding: 10px 15px;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--primary-color);
    background-color: var(--surface);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tone-option {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    color: var(--text-primary);
}

.tone-option:hover,
.tone-option.highlighted {
    background-color: var(--surface);
}

.tone-option.selected {
    background-color: var(--primary-color);
    color: white;
}

.tone-option:last-child {
    border-bottom: none;
}

.currency-code {
    font-weight: 600;
    color: var(--primary-color);
    margin-right: 8px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.toggle-switch input[type="checkbox"] {
    width: 44px;
    height: 24px;
    appearance: none;
    background-color: var(--border-color);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

.toggle-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .calculate-btn,
    .print-btn,
    .add-item-btn,
    .remove-item-btn,
    .copy-btn,
    .related-tools,
    .tool-faq,
    .how-it-works,
    .tool-header {
        display: none !important;
    }

    .tool-page {
        padding: 20px;
    }

    .tool-container {
        max-width: 100%;
    }

    .tool-calculator {
        box-shadow: none;
        border: none;
        padding: 0;
        page-break-inside: avoid;
    }

    .invoice-items {
        page-break-inside: avoid;
    }

    .invoice-item {
        page-break-inside: avoid;
    }

    .form-group-tool input,
    .form-group-tool textarea,
    .form-group-tool select {
        border: none;
        background: transparent;
        padding: 0;
    }

    .invoice-summary {
        page-break-inside: avoid;
    }

    body {
        background: white;
        color: black;
    }

    /* Invoice-specific print styles */
    .invoice-web-heading {
        display: none !important;
    }

    .invoice-print-heading {
        display: block !important;
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 2rem;
        text-align: left;
        color: #000;
        border-bottom: 3px solid #000;
        padding-bottom: 0.5rem;
    }
}

/* Invoice print heading - hidden on screen */
.invoice-print-heading {
    display: none;
}

