/* General Body & Font Styles */
html,
body {
    overflow-x: hidden;
    width: 100%;
}
body {
    font-family: "Inter", sans-serif;
    /* Add padding to the bottom to prevent the sticky footer from overlapping content */
    padding-bottom: 120px; 
}

/* Input Form Group Styling */
.input-group label {
    min-width: 200px;
}
.input-group-radio-label {
    min-width: 0;
}

/* Calculation Journey Table Styling */
.calc-journey-table td:first-child {
    padding-left: 10px;
    color: #4b5563; /* gray-600 */
}
.calc-journey-table td:last-child {
    text-align: right;
    font-weight: 500;
    color: #1f2937; /* gray-800 */
}
.calc-journey-table .subtotal td {
    border-top: 1px solid #cbd5e1; /* cool-gray-300 */
    font-weight: bold;
    padding-top: 4px;
    padding-bottom: 4px;
}
.calc-journey-table .subtotal td:first-child {
    color: #1f2937; /* gray-800 */
}
.calc-journey-table .net-pay td {
    border-top: 2px solid #6b7280; /* gray-500 */
    font-weight: bold;
    color: #16a34a; /* green-600 */
    font-size: 1.05em;
    padding-top: 6px;
    padding-bottom: 6px;
}
.calc-journey-table .note-row td {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280; /* gray-500 */
    padding-top: 1px;
    padding-bottom: 1px;
    font-style: italic;
    border-bottom: none;
}
.calc-journey-table .tax-breakdown-item td:first-child {
    padding-left: 25px !important;
    font-style: italic;
    font-size: 0.9em;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Remove number input spinners for a cleaner look */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Chart Container Styling */
#annualBreakdownChartContainer {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    height: 400px;
}

/* Collapsible Panel Styling */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.toggle-icon-svg {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
}

/* Custom Tooltip Styling */
.tooltip-icon {
    cursor: help;
    font-style: normal;
    display: inline-block;
}
.custom-tooltip {
    position: absolute;
    z-index: 10;
    width: max-content;
    max-width: min(15rem, calc(100vw - 60px)); /* Responsive max-width */
    padding: 0.5rem; /* p-2 */
    margin-bottom: 0.5rem; /* mb-2 */
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem; /* text-xs */
    color: #ffffff; /* text-white */
    background-color: #1f2937; /* bg-gray-800 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    opacity: 0;
    visibility: hidden;
    transition: opacity 150ms;
    pointer-events: none;
}
.custom-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Summary Panel Styling */
.summary-item {
    margin-bottom: 0.5rem; /* mb-2 */
}
.summary-group-title {
    font-weight: 600; /* font-semibold */
    color: #374151; /* text-gray-700 */
    margin-top: 1rem; /* mt-4 */
    margin-bottom: 0.5rem; /* mb-2 */
}
.summary-divider {
    border-top: 1px solid #e5e7eb; /* border-gray-200 */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Gemini AI Feature Styling */
#taxTipsContainer {
    margin-top: 1.5rem; /* mt-6 */
    padding-top: 1.5rem; /* pt-6 */
    border-top: 2px solid #3b82f6; /* border-blue-500 */
}
#taxTipsResult {
    background-color: #eff6ff; /* bg-blue-50 */
    border-left: 4px solid #3b82f6; /* border-blue-500 */
    padding: 1rem; /* p-4 */
    border-radius: 0.375rem; /* rounded-md */
}
#taxTipsResult ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}
#taxTipsResult li {
    margin-bottom: 0.5rem;
}
.gemini-button {
    background: linear-gradient(to right, #4f46e5, #818cf8);
}

/* Loading Spinner Animation */
.loader {
    border: 4px solid #f3f3f3; /* Light grey */
    border-top: 4px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive body padding for sticky footer */
@media (max-width: 768px) {
  body {
    padding-bottom: 90px; /* Shorter padding for mobile */
  }
}
