/* Dark mode transition */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure all color transitions are smooth */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Smaller search bar styles */
.search-box {
    max-width: 350px;
}

.search-box .btn {
    pointer-events: none;
}

/* Welcome message styles */
#welcome-message {
    padding: 1rem 0 1.5rem;
}

#welcome-message i {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: #ff7b00;
}

#welcome-message h1 {
    font-weight: 500;
    color: #444;
    letter-spacing: -0.01em;
}

/* Marketing text styles */
.marketing-text {
    max-width: 700px;
    margin: 0 auto 2rem;
}

.marketing-text .lead {
    font-weight: 400;
    color: #444;
    font-size: 1.25rem;
}

.marketing-text .text-muted {
    font-size: 0.95rem;
    color: #6c757d;
}

body.dark-mode .marketing-text .lead {
    color: #e9e9e9;
}

body.dark-mode .marketing-text .text-muted {
    color: #adb5bd;
}

/* Badge toggle button styling */
.badge-toggle-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 2rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.badge-toggle-btn:hover {
    background-color: #f0f8ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-toggle-btn i {
    color: #ff7b00;
    transition: transform 0.3s ease;
}

/* Categories area styles */
.quick-access-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

.quick-access {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

@media (max-width: 768px) {
    .quick-access {
        gap: 0.5rem;
    }
}

.badge-button {
    display: inline-flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.badge-button:before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background-color: #ff7b00;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.badge-button:hover {
    background-color: #f0f8ff;
    border-color: #dee2e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: #212529;
}

.badge-button:hover:before {
    transform: scaleX(1);
}

.badge-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(13, 110, 253, 0.1);
}

.badge-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
    color: #ff7b00;
    transition: color 0.2s ease;
}

.badge-button:hover i {
    color: #ff7b00;
}

/* Dark mode styles for badge buttons */
body.dark-mode .badge-button {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

body.dark-mode .badge-button:hover {
    background-color: #2b3035;
    border-color: #495057;
    color: #f8f9fa;
}

body.dark-mode .badge-button i {
    color: #ff9e45;
}

body.dark-mode .badge-button:hover i {
    color: #ff9e45;
}

/* Custom tooltip styling */
.calculator-tooltip {
    --bs-tooltip-max-width: 250px;
    --bs-tooltip-bg: rgba(255, 123, 0, 0.95);
    --bs-tooltip-color: #fff;
    --bs-tooltip-padding-x: 0.75rem;
    --bs-tooltip-padding-y: 0.5rem;
    --bs-tooltip-font-size: 0.875rem;
    --bs-tooltip-opacity: 1;
    --bs-tooltip-arrow-width: 0.8rem;
    --bs-tooltip-arrow-height: 0.4rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Dark mode tooltip adjustments */
body.dark-mode .calculator-tooltip {
    --bs-tooltip-bg: rgba(255, 123, 0, 0.9);
}



/* Calculator Content Styles */
.calculator-content {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
}

.calculator-content h1 {
    font-size: 2.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.calculator-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ff7b00;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.calculator-content h3 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.calculator-content p {
    margin-bottom: 1.25rem;
    color: #444;
    font-size: 1.125rem;
}

.calculator-content .lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #555;
    line-height: 1.7;
}

.calculator-content ul, .calculator-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
    font-size: 1.125rem;
}

.calculator-content li {
    margin-bottom: 0.5rem;
}

.calculator-content strong {
    font-weight: 600;
    color: #333;
}

.calculator-content .formula-container {
    padding: 1.5rem;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calculator-content .highlight-box {
    background-color: #f8f9fa;
    border-left: 4px solid #ff7b00;
    padding: 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Dark mode adjustments for calculator content */
body.dark-mode .calculator-content {
    color: #e0e0e0;
}

body.dark-mode .calculator-content h1 {
    color: #f0f0f0;
}

body.dark-mode .calculator-content h2 {
    color: #ff9e45;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .calculator-content h3 {
    color: #e0e0e0;
}

body.dark-mode .calculator-content p {
    color: #d0d0d0;
}

body.dark-mode .calculator-content .lead {
    color: #d0d0d0;
}

body.dark-mode .calculator-content strong {
    color: #f0f0f0;
}

body.dark-mode .calculator-content .formula-container {
    background: linear-gradient(145deg, #2c3034 0%, #212529 100%);
}

body.dark-mode .calculator-content .highlight-box {
    background-color: #2c3034;
    border-left-color: #ff9e45;
}
