/* Smiley Loan Calculator Styles */
.smiley-loan-calculator {
    width: 640px;
    margin: 0 auto;
    font-family: inherit, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif !important;
    background: #fff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    line-height: 1.5 !important;
    font-size: 16px !important;
    color: #1a1a1a !important;
}

/* Reset any inherited styles that might conflict */
.smiley-loan-calculator,
.smiley-loan-calculator * {
    box-sizing: border-box !important;
}

.smiley-loan-calculator * {
    font-family: inherit !important;
}

/* Glowing Banner */
.slc-banner {
    background: linear-gradient(45deg, #FF6900, #FCB900, #FF6900);
    background-size: 400% 400%;
    animation: slc-glow 3s ease-in-out infinite;
    padding: 16px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.slc-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: slc-shine 4s linear infinite;
}

.smiley-loan-calculator .slc-banner-text {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    letter-spacing: 0.3px !important;
    text-transform: uppercase !important;
    position: relative !important;
    z-index: 1 !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@keyframes slc-glow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 20px rgba(255, 105, 0, 0.5), 0 0 40px rgba(255, 105, 0, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 30px rgba(252, 185, 0, 0.6), 0 0 60px rgba(252, 185, 0, 0.4);
    }
}

@keyframes slc-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.slc-container {
    width: calc(100%);
    padding: 32px;
}

.smiley-loan-calculator .slc-title {
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 0 8px 0 !important;
    color: #1a1a1a !important;
    text-align: left !important;
    font-family: inherit !important;
}

.smiley-loan-calculator .slc-customize {
    background: linear-gradient(45deg, #FF6900, #FCB900) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.smiley-loan-calculator .slc-section-label {
    font-size: 16px !important;
    color: #6b7280 !important;
    margin-bottom: 32px !important;
    font-weight: 500 !important;
    display: block !important;
    font-family: inherit !important;
}

/* Amount Section */
.slc-amount-section {
    margin-bottom: 16px;
}

.slc-amount-display {
    position: relative;
}

.slc-amount-labels {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    position: relative;
    padding: 0 10px;
}

.slc-min-label,
.slc-max-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 14px;
    color: #9ca3af;
    flex: 0 0 auto;
    max-width: 80px;
}

.slc-label-text {
    margin-bottom: 4px;
    font-weight: 500;
    white-space: nowrap;
}

.slc-amount-value {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.slc-current-amount {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #FF6900, #FCB900, #FF6900);
    background-size: 200% 200%;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
    animation: gradientShift 3s ease-in-out infinite;
}

.slc-current-amount:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 105, 0, 0.4);
}

.slc-currency {
    font-size: 18px;
    margin-right: 2px;
}

/* Slider Styles - Clean Straight Track */
.slc-slider-container {
    position: relative;
    margin-top: 40px;
    padding: 0 20px;
    height: 40px;
}

.slc-slider-track {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    position: relative;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.slc-slider-progress {
    height: 100%;
    background: linear-gradient(90deg, #FF6900, #FCB900);
    border-radius: 3px;
    width: 50%;
    transition: width 0.3s ease;
    box-shadow: 0 0 6px rgba(255, 105, 0, 0.3);
}

.slc-slider-handle {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #FF6900, #FCB900);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 105, 0, 0.4);
    transition: all 0.2s ease;
    z-index: 10;
    border: 2px solid white;
}

.slc-slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.6);
}

.slc-slider-handle {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #FF6900, #FCB900);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 105, 0, 0.4);
    transition: all 0.2s ease;
    left: 50%;
    z-index: 10;
    /* Add a white border to make it pop on the curved track */
    border: 2px solid white;
}

.slc-slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 105, 0, 0.6);
    border-width: 3px;
}

#slc-amount-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

#slc-amount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

#slc-amount-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    border: none;
}

/* Payment Options */
.slc-payments-section {
    margin-bottom: 32px;
}

.slc-payment-options {
    display: flex;
    gap: 12px;
}

.slc-payment-btn {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slc-payment-btn:hover {
    border-color: #FF6900;
    background: #fff5ed;
}

.slc-payment-btn.active {
    background: linear-gradient(135deg, #FF6900, #FCB900);
    color: #fff;
    border-color: #FF6900;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 105, 0, 0.2);
}

/* Results Section */
.slc-results {
    background: linear-gradient(135deg, rgba(255, 105, 0, 0.1), rgba(252, 185, 0, 0.1));
    border: 1px solid rgba(255, 105, 0, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.slc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 105, 0, 0.1);
}

.slc-result-item:last-child {
    border-bottom: none;
}

.slc-result-label {
    font-size: 16px;
    color: #6b7280;
    font-weight: 500;
}

.slc-result-value {
    font-size: 18px;
    background: linear-gradient(45deg, #FF6900, #FCB900);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: valueUpdate 0.3s ease-in-out;
}

/* Keyframe animations */
@keyframes valueUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Responsive Design */
@media (max-width: 680px) {
    .smiley-loan-calculator {
        width: 100%;
        padding: 0;
        margin: 16px;
        border-radius: 12px;
    }
    
    .slc-container {
        padding: 20px 16px;
    }
    
    .slc-banner {
        padding: 12px 16px;
    }
    
    .slc-banner-text {
        font-size: 16px;
        letter-spacing: 0.2px;
        line-height: 1.2;
    }
    
    .slc-title {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .slc-amount-labels {
        padding: 0 5px;
        margin-bottom: 20px;
    }
    
    .slc-min-label,
    .slc-max-label {
        font-size: 12px;
        max-width: 70px;
    }
    
    .slc-label-text {
        font-size: 11px;
    }
    
    .slc-amount-value {
        font-size: 13px;
    }
    
    .slc-current-amount {
        font-size: 18px;
        padding: 8px 14px;
    }
    
    .slc-payment-options {
        gap: 8px;
    }
    
    .slc-payment-btn {
        padding: 12px 16px;
        font-size: 16px;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .slc-container {
        padding: 16px 12px;
    }
    
    .slc-amount-labels {
        padding: 0 2px;
    }
    
    .slc-min-label,
    .slc-max-label {
        max-width: 60px;
        font-size: 11px;
    }
    
    .slc-label-text {
        font-size: 10px;
    }
    
    .slc-amount-value {
        font-size: 12px;
    }
    
    .slc-current-amount {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .slc-title {
        font-size: 20px;
    }
}
