/* KALKULATOR PAGE STYLES - NAMESPACED WITH calc- PREFIX */

/* Required Animations */
@keyframes morphingGradient {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 0.6; 
    }
    50% { 
        transform: scale(1.1) rotate(1deg); 
        opacity: 1; 
    }
}

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

/* Calculator Hero Section */
.calc-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.1));
}

.calc-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    animation: morphingGradient 8s ease-in-out infinite;
}

.calc-hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.calc-hero h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff, #0ea5e9, #10b981);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    animation: gradientShift 4s ease-in-out infinite;
}

.calc-hero-description {
    font-size: 1.2rem;
    color: #cbd5e1;
    line-height: 1.6;
}

/* Calculator Container */
.calc-container {
    padding: 60px 0 100px 0;
    max-width: 900px;
    margin: 0 auto;
}

.calc-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 20px;
    padding: 50px;
    backdrop-filter: blur(15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.calc-content {
    position: relative;
    z-index: 2;
}

.calc-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

/* Credit Type Selector */
.calc-credit-types {
    margin-bottom: 40px;
}

.calc-credit-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.calc-credit-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid #D7AF6B;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.calc-credit-type-btn:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}

.calc-credit-type-btn.active {
    background: #D7AF6B;
    color: #0f172a;
    border-color: #D7AF6B;
}

.calc-credit-type-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.calc-credit-type-label {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Form Groups */
.calc-form-group {
    margin-bottom: 40px;
}

.calc-form-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 15px;
}

.calc-value-display {
    color: #D7AF6B;
    font-weight: 800;
}

.calc-slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.calc-slider {
    flex: 1;
    height: 8px;
    background: rgba(71, 85, 105, 0.5);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: box-shadow 0.3s ease;
}

.calc-slider.recently-moved {
    box-shadow: 0 0 0 3px rgba(215, 175, 107, 0.3);
}

.calc-slider[data-invalid="true"] {
    background: rgba(248, 113, 113, 0.3);
}

.calc-slider[data-invalid="true"]::-webkit-slider-thumb {
    background: #f87171;
}

.calc-slider[data-invalid="true"]::-moz-range-thumb {
    background: #f87171;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #D7AF6B;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(215, 175, 107, 0.3);
}

.calc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #D7AF6B;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(215, 175, 107, 0.3);
}

.calc-input-field {
    width: 120px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 1rem;
    text-align: right;
    transition: all 0.3s ease;
}

.calc-input-field:focus {
    outline: none;
    border-color: #D7AF6B;
    box-shadow: 0 0 0 3px rgba(215, 175, 107, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.calc-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 5px;
}

/* Select Field */
.calc-select-field {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calc-select-field:focus {
    outline: none;
    border-color: #D7AF6B;
    box-shadow: 0 0 0 3px rgba(215, 175, 107, 0.1);
}

.calc-select-field option {
    background: #1e293b;
    color: white;
}

/* Results Section */
.calc-results-section {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.calc-results-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #D7AF6B;
    margin-bottom: 25px;
    text-align: center;
}

.calc-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}

.calc-result-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 2px solid rgba(215, 175, 107, 0.3);
}

.calc-result-label {
    color: #cbd5e1;
    font-weight: 600;
}

.calc-result-value {
    color: #e2e8f0;
    font-weight: 700;
}

.calc-result-item:last-child .calc-result-value {
    color: #D7AF6B;
    font-size: 1.2rem;
}

/* CTA Button */
.calc-cta {
    margin-top: 30px;
    text-align: center;
}

.calc-btn-calculator {
    background: linear-gradient(135deg, #D7AF6B, #b59548);
    color: #0f172a;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 200px;
}

.calc-btn-calculator:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(215, 175, 107, 0.4);
    background: linear-gradient(135deg, #b59548, #D7AF6B);
}

/* Error Messages */
.calc-error-message {
    color: #f87171;
    font-size: 0.9rem;
    margin-top: 8px;
    display: none;
}

.calc-error-message.show {
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .calc-hero {
        padding-top: 100px;
        min-height: 30vh;
    }

    .calc-hero h1 {
        font-size: 2.2rem;
    }

    .calc-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .calc-credit-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .calc-credit-type-btn {
        padding: 15px 10px;
    }

    .calc-credit-type-icon {
        font-size: 1.5rem;
    }

    .calc-slider-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .calc-input-field {
        width: 100%;
        text-align: center;
    }

    .calc-slider-labels {
        display: none;
    }
}