/* style.css */

/* Basic reset and box-sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif; /* Set font as requested */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Equivalent of Tailwind's min-h-screen */
.min-h-screen {
    min-height: 100vh;
}

/* Equivalent of Tailwind's bg-gray-100 */
.bg-gray-100 {
    background-color: #f3f4f6;
}

/* Equivalent of Tailwind's p-4 sm:p-8 */
.p-4 {
    padding: 1rem; /* 16px */
}
@media (min-width: 640px) { /* sm breakpoint */
    .sm\:p-8 {
        padding: 2rem; /* 32px */
    }
}

/* Equivalent of Tailwind's max-w-6xl mx-auto */
.max-w-6xl {
    max-width: 72rem; /* 1152px */
}
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Flexbox for stacking sections vertically with gap */
.flex-col {
    flex-direction: column;
}
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem; /* 24px */
}

/* Shared panel styling: bg-white rounded-xl shadow-lg p-6 */
.bg-white {
    background-color: #ffffff;
}
.rounded-xl {
    border-radius: 0.75rem; /* 12px */
}
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.p-6 {
    padding: 1.5rem; /* 24px */
}
.flex-grow {
    flex-grow: 1;
}

/* Text styles */
.text-2xl {
    font-size: 1.5rem; /* 24px */
    line-height: 2rem; /* 32px */
}
.text-gray-800 {
    color: #1f2937;
}
.font-semibold {
    font-weight: 600;
}
.mb-6 {
    margin-bottom: 1.5rem; /* 24px */
}
.block {
    display: block;
}
.text-gray-700 {
    color: #374151;
}
.text-sm {
    font-size: 0.875rem; /* 14px */
    line-height: 1.25rem; /* 20px */
}
.font-medium {
    font-weight: 500;
}
.mb-2 {
    margin-bottom: 0.5rem; /* 8px */
}

/* Input/Select styles */
.w-full {
    width: 100%;
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.border {
    border-width: 1px;
}
.border-gray-300 {
    border-color: #d1d5db;
}
/* Focus ring and border colors (manual Tailwind equivalents) */
.focus\:ring-green-500:focus {
    outline: 2px solid #22c55e; /* green-500 */
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.5); /* green-500 with opacity */
}
.focus\:border-green-500:focus {
    border-color: #22c55e; /* green-500 */
}
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Specific currency and promotion container styles */
.mb-6 {
    margin-bottom: 1.5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.flex {
    display: flex;
}
.items-center {
    align-items: center;
}
.h-4 {
    height: 1rem;
}
.w-4 {
    width: 1rem;
}
.text-green-600 {
    color: #16a34a; /* green-600 */
}
.rounded {
    border-radius: 0.25rem; /* 4px */
}
.ml-2 {
    margin-left: 0.5rem;
}

/* Promotion fields container */
.bg-gray-50 {
    background-color: #f9fafb;
}
.border-gray-200 {
    border-color: #e5e7eb;
}
.mt-4 {
    margin-top: 1rem;
}
.mb-0 {
    margin-bottom: 0;
}
.hidden {
    display: none; /* Used for JS to toggle visibility */
}

/* Results summary panel */
.bg-green-100 {
    background-color: #dcfce7; /* green-100 */
}
.text-center {
    text-align: center;
}
.text-lg {
    font-size: 1.125rem; /* 18px */
    line-height: 1.75rem; /* 28px */
}
.text-5xl {
    font-size: 3rem; /* 48px */
    line-height: 1;
}
.font-bold {
    font-weight: 700;
}
.text-green-700 {
    color: #047857; /* green-700 */
}

/* Error message style */
.text-red-600 {
    color: #dc2626; /* Equivalent to Tailwind's red-600 */
}

/* Breakdown section */
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.75rem; /* 12px */
}
.max-h-96 {
    max-height: 24rem; /* 384px */
}
.overflow-y-auto {
    overflow-y: auto;
}
.pr-2 {
    padding-right: 0.5rem;
}

/* Individual breakdown item */
.w-1\/4 {
    width: 25%;
}
.w-3\/4 {
    width: 75%;
}
.whitespace-nowrap {
    white-space: nowrap;
}
.bg-gray-200 {
    background-color: #e5e7eb;
}
.h-3 {
    height: 0.75rem; /* 12px */
}
.bg-green-500 {
    background-color: #22c55e;
}
.ml-3 {
    margin-left: 0.75rem; /* 12px */
}

/* CSV Download Button */
.mt-6 {
    margin-top: 1.5rem;
}
.pt-6 {
    padding-top: 1.5rem;
}
.border-t {
    border-top-width: 1px;
}
.border-gray-200 {
    border-color: #e5e7eb;
}
.bg-green-600 {
    background-color: #16a34a;
}
.hover\:bg-green-700:hover {
    background-color: #047857;
}
.text-white {
    color: #ffffff;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
/* Re-using rounded-xl */
.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.duration-200 {
    transition-duration: 200ms;
}
.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.transform {
    transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}
.hover\:scale-105:hover {
    --tw-scale-x: 1.05;
    --tw-scale-y: 1.05;
    transform: scale(1.05);
}
.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}
.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px rgba(255,255,255,0), 0 0 0 4px rgba(34, 197, 94, 0.75); /* ring-offset + ring */
}
.focus\:ring-green-500:focus {
    /* defined in focus:ring-2 */
}
.focus\:ring-opacity-75:focus {
    /* defined in focus:ring-2 */
}

/* New Table Styles */
.overflow-x-auto {
    overflow-x: auto;
}

#comparativeTable {
    border-collapse: collapse; /* Ensure borders are collapsed */
    width: 100%; /* Take full width of its container */
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem; /* text-sm */
}

#comparativeTable th,
#comparativeTable td {
    padding: 0.75rem 0.5rem; /* py-3 px-2 */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    white-space: nowrap; /* Prevent wrapping in cells */
    text-align: center;
}

#comparativeTable th {
    background-color: #f3f4f6; /* gray-100 */
    color: #1f2937; /* gray-800 */
    font-weight: 600; /* font-semibold */
    position: sticky;
    top: 0;
    z-index: 10; /* Keep headers above content on scroll */
}

/* Specific style for the top-left blank corner */
#comparativeTable th:first-child {
    background-color: #e5e7eb; /* gray-200 */
    color: #374151; /* gray-700 */
    font-weight: 500; /* font-medium */
}

/* Color classes for the heatmap effect */
/* These map to a gradient from light green to darker green */
.color-scale-1 { background-color: #f0fdf4; /* green-50 */ }
.color-scale-2 { background-color: #dcfce7; /* green-100 */ }
.color-scale-3 { background-color: #a7f3d0; /* green-200 */ }
.color-scale-4 { background-color: #6ee7b7; /* green-300 */ }
.color-scale-5 { background-color: #34d399; /* green-400 */ }


/* Ensure text in colored cells is readable */
.color-scale-1, .color-scale-2, .color-scale-3, .color-scale-4, .color-scale-5 {
    color: #1f2937; /* Dark text for readability on light backgrounds */
}
