
/* Common CSS for Casagrand Calculators */

.calculator-container {
    width: 1240px;
    margin: 0 auto;
    max-width: 100%;
    padding: 50px 20px;
}

.calculator-header {
    text-align: left;
    margin-bottom: 30px;
}

.calculator-header h1 {
    color: #333;
    font-size: 30px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fcbb55, #f7931e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.calculator-header p {
    color: #666;
    font-size: 16px;
}

/* 2-Column Layout Styles */
.calculator-content {
    display: flex;
    gap: 50px;
    margin-bottom: 30px;
}

.left-column {
    flex: 1;
    min-width: 0;
    width: 50%;
}

.right-column {
    flex: 1;
    min-width: 0;
    width: 50%;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.info-icon {
    margin-left: 8px;
    color: #fcbb55;
    cursor: pointer;
    font-size: 14px;
}

.info-icon:hover {
    color: #f7931e;
}

.form-group select, 
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group select:focus, 
.form-group input:focus {
    outline: none;
    border-color: #fcbb55;
    box-shadow: 0 0 0 3px rgba(252, 187, 85, 0.1);
}

/* Property value input with rupee sign background */
#propertyValue {
    background-image: url("data:image/svg+xml,%3Csvg height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 6V4H6v2h3.5c1.302 0 2.401.838 2.815 2H6v2h6.315A2.994 2.994 0 0 1 9.5 12H6v2.414L11.586 20h2.828l-6-6H9.5a5.007 5.007 0 0 0 4.898-4H17V8h-2.602a4.933 4.933 0 0 0-.924-2H17z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 20px;
    padding-left: 32px;
}

.label-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.label-input-group label {
    flex: 1;
    margin-bottom: 0;
}

.label-input-group input, 
.label-input-group select {
    flex: 0 0 180px;
}

.slider-container {
    width: 100%;
    margin-top: 20px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.8rem;
    color: #666;
}

.ui-slider {
    height: 2px;
    border-radius: 1px;
    background: #d0d6dd;
    border: none;
}

.ui-slider-range {
    background: #fcbb55;
    border-radius: 1px;
}

.ui-slider-horizontal .ui-slider-handle {
    top: -7px;
    margin-left: -.6em;
    width: 14px;
    height: 14px;
    border: 2px solid #fcbb55 !important;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
}

.ui-slider-handle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(252, 187, 85, 0.3);
}

.result-box {
    background: linear-gradient(135deg, #fcbb55, #f7931e);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(252, 187, 85, 0.3);
}

.result-box h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.emi-results-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.emi-results-row .result-item {
    flex: 1;
    text-align: center;
    margin: 0;
}

.emi-results-row .result-value {
    font-size: 1.1rem;
}

.result-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0 10px;
}

.savings-section {
    width: 100%;
}

.savings-section .result-item {
    margin-bottom: 15px;
    text-align: left;
}

.savings-section .result-item:last-child {
    margin-bottom: 0;
    text-align: center;
    width: 100%;
}

.savings-section .result-item:last-child .result-label,
.savings-section .result-item:last-child .result-value {
    text-align: center;
    width: 100%;
}

.hidden {
    display: none;
}

.tooltip {
    position: relative;
    display: inline-block;
}
.calculator-container .tooltip{
    opacity: 1 !important;
}
.calculator-container .fa-solid, .calculator-container .fas{
    font-family: "Font Awesome 6 Free" !important;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Specific styles for different calculators */
.tenure-switch {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.switch-container {
    display: flex;
    background: #f0f0f0;
    border-radius: 15px;
    padding: 2px;
    width: 100px;
    height: 24px;
}

.switch-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: #666;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-btn.active {
    background: #fcbb55;
    color: white;
    box-shadow: 0 2px 4px rgba(252, 187, 85, 0.3);
}

.switch-btn:hover:not(.active) {
    background: #e0e0e0;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    width: auto;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.payment-group {
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
}

.payment-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.payment-fields-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.payment-field-left {
    flex: 2;
}

.payment-field-right {
    flex: 1;
}

.payment-field-right .form-group {
    margin-bottom: 0;
}

.payment-field-right .form-group label {
    margin-bottom: 8px;
}

.payment-field-right .form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.payment-field-right .form-group input:focus {
    outline: none;
    border-color: #fcbb55;
    box-shadow: 0 0 0 3px rgba(252, 187, 85, 0.1);
}

.result-item {
    margin-bottom: 20px;
}

.result-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.amortization-section {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #e1e5e9;
    border-radius: 15px;
    background: #f8f9fa;
}

.amortization-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.amortization-table th,
.amortization-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
}

.amortization-table th {
    background: #fcbb55;
    color: white;
    font-weight: 600;
}

.amortization-table tr:nth-child(even) {
    background: #f8f9fa;
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: end;
}

.input-row .form-group {
    flex: 1;
}

.input-row .form-group:last-child {
    flex: 0 0 150px;
}

.unit-info {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #666;
}

.unit-info h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.unit-info ul {
    list-style: none;
    padding: 0;
}

.unit-info li {
    padding: 5px 0;
    border-bottom: 1px solid #e1e5e9;
}

.unit-info li:last-child {
    border-bottom: none;
}

/* Specific result styles */
.recommendation {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profit-amount {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.conversion-result {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.conversion-detail {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.state-info {
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

.stamp-duty-amount {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.interest-rate {
    font-size: 1.1rem;
    opacity: 0.9;
}

.select2-container .select2-selection--single{
    height: 52px;
}
.select2-container .select2-selection--single{
    align-content: center;
    padding:0 4px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow{
    top: 50%;
    width: 30px;
    transform: translateY(-50%);
}
.select2-container--default .select2-selection--single .select2-selection__clear{
    margin-right: 30px;
}


/* Responsive Design */
@media (max-width: 768px) {

    
    .calculator-header h1 {
        font-size: 24px;
    }
    .calculator-header p{
        font-size: 16px;
    }
    
    .label-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .label-input-group input, 
    .label-input-group select {
        flex: none;
    }
    
    .profit-amount {
        font-size: 1.8rem;
    }
    
    .conversion-result {
        font-size: 1.5rem;
    }
    
    .stamp-duty-amount {
        font-size: 1.5rem;
    }
    
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-row .form-group:last-child {
        flex: 1;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .payment-fields-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .payment-field-left,
    .payment-field-right {
        flex: none;
        width: 100%;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .amortization-table {
        font-size: 0.8rem;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 8px 4px;
    }
    .slider-container{
        margin-top: 20px;
    }
    .input-row .form-group{
        width: 100%;
    }
} 


/* 2-Column Layout for Land Area Converter */
.calculator-layout {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.calculator-left {
    flex: 1;
    max-width: 60%;
}

.calculator-right {
    flex: 1;
    max-width: 40%;
    position: sticky;
    top: 20px;
    order: 2;
}

/* Responsive design for 2-column layout */
@media (max-width: 1200px) {
    .calculator-layout {
        gap: 30px;
    }
    
    .calculator-left {
        max-width: 55%;
    }
    
    .calculator-right {
        max-width: 45%;
    }
}

@media (max-width: 1024px) {
    .calculator-layout {
        gap: 25px;
    }
    
    .calculator-left {
        max-width: 50%;
    }
    
    .calculator-right {
        max-width: 50%;
    }
}

@media (max-width: 900px) {
    .calculator-layout {
        flex-direction: column;
        gap: 30px;
    }
    
    .calculator-left {
        max-width: 100%;
        width: 100%;
        order: 1;
    }
    
    .calculator-right {
        max-width: 100%;
        position: static;
        width: 100%;
        order: 2;
    }
}

@media (max-width: 768px) {
    .calculator-layout {
        gap: 20px;
    }
    
    .calculator-header h1 {
        font-size: 24px;
    }
    
    .calculator-header p {
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 10px;
    }
    
    .result-box {
        padding: 20px;
    }
    
    .result-box h3 {
        font-size: 18px;
    }
    
    .conversion-result {
        font-size: 1.5rem;
    }
    
    .unit-info {
        font-size: 13px;
    }
    
    .unit-info h4 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .calculator-layout {
        gap: 15px;
    }
    
    .calculator-header h1 {
        font-size: 20px;
    }
    
    .calculator-header p {
        font-size: 13px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 13px;
        padding: 8px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-row .form-group {
        flex: none;
    }
    
    .result-box {
        padding: 15px;
    }
    
    .result-box h3 {
        font-size: 16px;
    }
    
    .conversion-result {
        font-size: 1.3rem;
    }
    
    .conversion-detail {
        font-size: 14px;
    }
    
    .state-info {
        font-size: 13px;
    }
    
    .unit-info {
        font-size: 12px;
        padding: 15px;
    }
    
    .unit-info h4 {
        font-size: 14px;
    }
    
    .unit-info ul {
        padding-left: 15px;
    }
    
    .unit-info li {
        margin: 3px 0;
    }
}

/* Responsive styles for Home Loan Prepayment Calculator 2-column layout */
@media (max-width: 1200px) {
    .calculator-content {
        gap: 25px;
    }
    
    .right-column {
        width: 50%;
    }
}

@media (max-width: 1024px) {
    .calculator-content {
        gap: 20px;
    }
    
    .right-column {
        width: 50%;
    }
}

@media (max-width: 900px) {
    .calculator-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .left-column {
        order: 1;
        width: 100%;
    }
    
    .right-column {
        flex: none;
        width: 100%;
        position: static;
        order: 2;
    }
}

/* Buy vs Rent Calculator specific styles */
.buy-rent-left {
    flex: 0 0 55%;
    min-width: 0;
}

.buy-rent-right {
    flex: 0 0 45%;
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.chart-section {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.chart-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

#comparisonChart {
    height: 370px !important;
    max-height: 370px !important;
}

.summary-table-section {
    margin: 20px 0;
}

.summary-table-section h4 {
    margin-bottom: 15px;
    color: white;
    font-size: 1.1rem;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 1);
    border-radius: 8px;
    overflow: hidden;
}

.summary-table th,
.summary-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.summary-table th {
    background: rgba(255, 255, 255, 1);
    font-weight: 600;
    color: #000000;
}

.summary-table td {
    color: #000000;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-table tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive styles for Buy vs Rent Calculator */
@media (max-width: 1200px) {
    .buy-rent-left {
        flex: 0 0 52%;
    }
    
    .buy-rent-right {
        flex: 0 0 48%;
    }
}

@media (max-width: 1024px) {
    .buy-rent-left {
        flex: 0 0 50%;
    }
    
    .buy-rent-right {
        flex: 0 0 50%;
    }
}

@media (max-width: 900px) {
    .buy-rent-left {
        flex: none;
        width: 100%;
        order: 1;
    }
    
    .buy-rent-right {
        flex: none;
        width: 100%;
        position: static;
        order: 2;
    }
}

@media (max-width: 768px) {
    .calculator-content {
        gap: 20px;
    }
    
    .calculator-header h1 {
        font-size: 24px;
    }
    
    .calculator-header p {
        font-size: 14px;
    }
    
    .form-group label {
        font-size: 14px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 14px;
        padding: 10px;
    }
    
    .result-box {
        padding: 20px;
    }
    
    .result-box h3 {
        font-size: 18px;
    }
    
    .chart-section {
        padding: 10px;
    }
    
    .chart-section h4 {
        font-size: 1rem;
    }
    
    .summary-table-section h4 {
        font-size: 1rem;
    }
    
    .summary-table th,
    .summary-table td {
        padding: 8px;
        font-size: 13px;
    }
    
    .result-value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .calculator-content {
        gap: 15px;
    }
    
    .calculator-header h1 {
        font-size: 20px;
    }
    
    .calculator-header p {
        font-size: 13px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 13px;
        padding: 8px;
    }
    
    .result-box {
        padding: 15px;
    }
    
    .result-box h3 {
        font-size: 16px;
    }
    
    .chart-section {
        padding: 8px;
    }
    
    .chart-section h4 {
        font-size: 0.9rem;
    }
    
    .summary-table-section h4 {
        font-size: 0.9rem;
    }
    
    .summary-table th,
    .summary-table td {
        padding: 6px;
        font-size: 12px;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
}

/* Switch Tabs */
.switch-tabs {
    display: flex;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Additional Info */
.additional-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 1);
    border-radius: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #000000;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    font-size: 14px;
    opacity: 0.9;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: #fcbb55;
}
