/* FRESH CSS - V6.9 - Desktop + Mobile Responsive Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Desktop Base Styles - Original Desktop Design */
body {
  background: #ffffff;
  font-family: 'Inter', Arial, 'Segoe UI', sans-serif;
  min-height: 100vh;
  padding: 20px;
  color: #333;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.calculator-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.calculator-bottom-section {
    background: #000000;
    color: #FFFFFF;
    padding: 50px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-radius: 8px;
}

.savings-info {
    text-align: left;
}

.savings-title {
    font-size: 32px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 8px 0;
}

.savings-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #A0A0A0;
    margin: 0;
}

.savings-amount-container {
    display: flex;
    align-items: baseline;
    font-weight: 700;
}

.currency {
    font-size: 64px;
    margin-right: 4px;
}

.amount {
    font-size: 64px;
}

.main-heading {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  color: #000000;
}

.cta-section {
  width: 100%;
  max-width: 1288px;
  text-align: left;
  margin-top: 40px;
}

.cta-button {
  background: #3B82F6;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background: #2563EB;
}

/* Desktop-only base styles for mobile-specific classes */
.top-section-grey {
  background: transparent;
}

.input-container {
  background: transparent;
}

.input-box-align {
  width: 100%;
}

.input-section {
  /* Inherits from Tailwind classes */
}

.breakdown-section {
  /* Inherits from Tailwind classes */
}

/* Enhanced Mobile Responsive Styles */
@media (max-width: 1200px) {
    .calculator-top-section {
        flex-direction: column;
        gap: 60px;
    }
    .breakdown-container {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #E1E5E9;
        padding-top: 60px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 20px;
    }

    .calculator-container {
        max-width: 430px;
        margin-left: auto !important;
        margin-right: auto !important;
        width: auto;
        padding-left: 0;
        padding-right: 0;
    }

    .main-heading {
        margin-top: 0;
        margin-bottom: 10px;
    }

    .calculator-bottom-section {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 20px;
        padding: 30px 16px 30px 16px !important;
        border-radius: 12px;
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .savings-info {
        position: static !important;
        left: auto !important;
    }

    .savings-title {
        font-size: 2.2rem !important;
        line-height: 1.1 !important;
    }

    .savings-subtitle {
        font-size: 12px;
        line-height: 1.4;
    }

    .currency, .amount {
        font-size: 3rem !important;
        line-height: 1.1 !important;
    }

    .savings-amount-container {
        width: auto !important;
        justify-content: flex-start !important;
        align-items: flex-end;
        margin-top: 10px;
        min-width: 0 !important;
        text-align: left !important;
        padding-left: 0 !important;
        max-width: 100% !important;
        overflow: hidden;
    }

    .currency, .amount {
        text-align: left !important;
        justify-content: flex-start !important;
    }

    /* Mobile-specific input styling */
    input[type="text"] {
        font-size: 24px !important;
        font-weight: 600 !important;
        line-height: 32px !important;
        color: #000 !important;
        font-family: 'Inter', Arial, 'Segoe UI', sans-serif !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Mobile breakdown adjustments */
    .breakdown-row {
        padding: 12px 0;
    }

    .breakdown-label {
        font-size: 14px;
    }

    .breakdown-value {
        font-size: 16px;
    }

    .overflow-hidden.rounded-2xl {
        max-width: 430px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 !important;
    }

    /* Mobile input container styling */
    .input-container {
        background: #F5F5F7 !important;
    }

    .input-container label {
        background: #F5F5F7 !important;
        display: block;
    }

    .flex.flex-col.w-full.capitalize label {
        margin-bottom: 4px;
        text-align: left !important;
    }

    .flex.h-11.items-center {
        width: 100% !important;
        padding-right: 20px !important;
    }

    input[type="text"] {
        font-family: 'Inter', Arial, 'Segoe UI', sans-serif !important;
        background: transparent !important;
        height: 44px !important;
        padding: 0 0 0 16px !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        color: #222 !important;
        width: 100%;
        display: flex;
        align-items: center;
    }

    .text-center.text-black.opacity-50 {
        font-family: 'Inter', Arial, 'Segoe UI', sans-serif !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        color: #222 !important;
        margin-left: 0 !important;
        margin-right: -8px !important;
        padding-right: 0 !important;
        align-self: center !important;
        display: flex;
        align-items: center;
        height: 44px;
    }

    /* Mobile breakdown section adjustments */
    .breakdown-section {
        padding-top: 36px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        border-top-left-radius: 0 !important;
    }

    .breakdown-section h2,
    .breakdown-section span {
        padding-left: 16px !important;
    }

    .breakdown-section .flex.gap-1\.5.items-center.pt-2 > div:first-child {
        padding-left: 16px !important;
    }

    .breakdown-section .flex.gap-1\.5.items-center.pt-2 > div:last-child {
        text-align: right !important;
        padding-right: 16px !important;
    }

    /* Mobile input section adjustments */
    .input-section {
        padding: 44px 10px 6px 10px !important;
    }

    .top-section-grey {
        background: #F5F5F7 !important;
        width: 100% !important;
    }

    .input-box-align {
        width: 100% !important;
        margin-right: 0 !important;
    }

    /* Reset mobile-specific input styling */
    .main-heading,
    .input-container,
    .flex.h-11.items-center,
    input[type="text"] {
        padding-left: 0 !important;
    }

    /* Mobile bottom section final adjustments */
    .calculator-bottom-section {
        padding-top: 36px !important;
        padding-bottom: 40px !important;
        justify-content: flex-start !important;
    }

    /* NUCLEAR OPTION - Override EVERY possible class combination */
    .calculator-bottom-section,
    .calculator-bottom-section.flex,
    .calculator-bottom-section.flex.justify-end,
    .calculator-bottom-section.flex.items-center.justify-end,
    div.calculator-bottom-section.flex.justify-end,
    div.calculator-bottom-section.flex.items-center.justify-end,
    div[class*="calculator-bottom-section"][class*="justify-end"] {
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* Force override the savings container with maximum specificity */
    .savings-amount-container,
    .savings-amount-container.flex,
    .savings-amount-container.flex.justify-end,
    .savings-amount-container.flex.items-baseline.justify-end,
    div.savings-amount-container.flex.justify-end,
    div.savings-amount-container.flex.items-baseline.justify-end,
    div[class*="savings-amount-container"][class*="justify-end"] {
        justify-content: flex-start !important;
        width: auto !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
    }

    .savings-title {
        font-size: 2.2rem !important;
        line-height: 1.1 !important;
    }

    .amount {
        font-size: 3rem !important;
        line-height: 1.1 !important;
    }

    /* FINAL NUCLEAR OPTION - Force with CSS custom properties and highest specificity */
    * [class*="calculator-bottom-section"] {
        justify-content: flex-start !important;
    }

    * [class*="savings-amount-container"] {
        justify-content: flex-start !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* Override ANY justify-end within mobile breakpoint */
    * [class*="justify-end"] {
        justify-content: flex-start !important;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
        padding-top: 15px;
    }

    .calculator-container {
        gap: 12px;
    }

    .main-heading {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .calculator-bottom-section {
        padding: 25px 16px;
        gap: 15px;
    }

    .savings-title {
        font-size: 20px;
    }

    .currency, .amount {
        font-size: 40px;
    }

    /* Smaller text for mobile */
    .breakdown-label {
        font-size: 13px;
    }

    .breakdown-value {
        font-size: 15px;
    }

    /* Adjust input container for mobile */
    .input-container {
        margin-bottom: 20px;
    }

    input[type="text"] {
        font-size: 16px !important;
        padding: 10px 14px !important;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .cta-button {
        padding: 18px 36px;
        font-size: 18px;
        min-height: 48px;
    }

    input[type="text"] {
        min-height: 44px;
    }
}

/* Landscape mobile adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 10px;
        justify-content: center;
    }

    .calculator-container {
        max-width: 90%;
    }

    .main-heading {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .calculator-bottom-section {
        padding: 20px 16px;
        gap: 10px;
    }

    .savings-title {
        font-size: 18px;
    }

    .currency, .amount {
        font-size: 36px;
    }
}

/* Mobile-specific utility classes */
.mobile-hidden {
    display: block;
}

.mobile-visible {
    display: none;
}

@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }

    .mobile-visible {
        display: block;
    }
}

/* Smooth transitions for responsive changes */
.calculator-container,
.calculator-bottom-section,
.savings-title,
.currency,
.amount {
    transition: all 0.3s ease;
}
