/**
 * Affiliate Calculator Styles
 * Matches the GUESTPOSTLINKS theme design
 */

/* .gpl-affiliate-calculator {
    font-family: var(--mt-font__main, 'Outfit', sans-serif);
    background: #ffffff;
    border-radius: 20px;
    margin: 2rem auto;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #ecf0f4;
    max-width: 1200px;
} */

.center {
    text-align: center;
}

.calculator-container {
    margin: 0 auto;
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #ecf0f4;
    border-radius: 20px;
    margin: 2rem auto;
    padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 2vw, 2rem);
}

/* Header Section */
.calculator-header {
    /* background: linear-gradient(135deg, var(--primary-color, #4166E1) 0%, #667eea 100%); */
    /* color: white; */
    /* padding: 40px 30px; */
    text-align: center;
    /* position: relative; */
}

/* .calculator-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
} */

.calculator-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.calculator-description {
    font-size: 1.125rem;
    margin: 0 0 32px 0;
    opacity: 0.95;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    color: var(--e-global-color-secondary);
}


/* Content Section */
/* .calculator-content {
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
} */

.calculator-main {
    display: flex;
    order: -1;
    gap: 20px;
    flex-wrap: wrap;
}

.calculator-sidebar {
    background: linear-gradient(135deg, #e8f2ff 0%, #f9faff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 300px;
}

.section-title {
    font-size: clamp(1.25rem, 6cqi, 2rem);
    font-weight: 600;
    color: #1d2128;
    margin: 0;
    text-align: center;
}

/* Commission Examples */
.commission-examples {
    margin-bottom: 40px;
    flex: 1;
    container-type: inline-size;
    container-name: commission-examples;
    min-width: 350px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax( 160px, 46cqi));
    gap: 3cqi;
    justify-content: center;
}

.example-card {
    text-align: center;
    /* padding: 24px 20px; */
    border-radius: 3px;
    border: 2px solid #ecf0f4;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    container-name: example-card;
}

/* .example-card.featured {
    border-color: var(--primary-color, #4166E1);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(65, 102, 225, 0.15);
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color, #4166E1);
    color: white;
    padding: 4px 16px;
    border-radius: 0 0 12px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
} */

/* .example-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #4166E1), #667eea);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.example-card:hover::before {
    transform: scaleX(1);
} */

.example-card:hover {
    border-color: currentColor;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(65, 102, 225, 0.15);
}

.gpl-affiliate-calculator.loaded .example-card:nth-child(1) {
    transition-delay: 0.1s;
    /* background: #F3E1FF; */
    color: #7E3FBF;

    .example-spend {
        background: #F3E1FF;
    }
}

.gpl-affiliate-calculator.loaded .example-card:nth-child(2) {
    transition-delay: 0.2s;
    color: #1A635A;

    .example-spend {
        background: #E4F5F3;
    }
}

.gpl-affiliate-calculator.loaded .example-card:nth-child(3) {
    transition-delay: 0.3s;
    color: #B56123;

    .example-spend {
        background: #FBEADD;
    }
}

.gpl-affiliate-calculator.loaded .example-card:nth-child(4) {
    transition-delay: 0.4s;
    color: #006699;

    .example-spend {
        background: #D6F3FF;
    }
}

.example-spend {
    font-size: clamp(1.5rem, 15cqi, 2rem);
    font-weight: 700;
    color: inherit;
    margin-bottom: 8px;
    padding: 0.5em;
}

.example-card .card-body {
    padding: 0.5em;
}

.example-spend span {
    font-size: 0.875em;
    opacity: 0.7;
}

.example-commission {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.example-earnings {
    font-size: clamp(1.2rem, 10cqi, 1.5rem);
    font-weight: 600;
    color: var(--primary-color, #4166E1);
}

.example-earnings span {
    font-size: 1rem;
    opacity: 0.8;
}

/* Interactive Calculator */

.earnings-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.calculator-interactive {
    background: #f8faff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #ecf0f4;
    flex: 1;
}

.calculator-inputs {
    margin-bottom: 32px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

#monthly-spend {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.125rem;

    &.input-group label {
        font-size: 1em;
        margin-bottom: 2px;
    }

    .input-wrapper input {
        padding: 0 0 0 0.5em;
        border-width: 0 0 2px 0;
        border-radius: 0;
        background: transparent;
        font-size: 1em;
        height: auto;
    }

    input[type=number]::-webkit-inner-spin-button, 
    input[type=number]::-webkit-outer-spin-button { 
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        margin: 0; 
    }

    .input-wrapper input:focus {
        outline: none;
        box-shadow: none;
    }
}

.input-group label {
    font-size: 0.875rem;
    /* font-weight: 600; */
    /* color: #1d2128; */
    margin-bottom: 8px;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
    text-align: center;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    font-size: clamp(1rem, 2cqi, 1.5rem);
}

.currency-symbol,
.percentage-symbol {
    position: absolute;
    font-weight: 600;
    color: #666;
    z-index: 2;
    font-size: 0.875em;
}

:not(#monthly-spend) .currency-symbol {
    left: 1em;
}

.percentage-symbol {
    right: 1em;
}

.input-wrapper input {
    width: 100%;
    padding: 0.5em;
    border: 2px solid #ecf0f4;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
    height: auto;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color, #4166E1);
    box-shadow: 0 0 0 4px rgba(65, 102, 225, 0.1);
}

#referral-spend {
    padding-left: 2em;
}

#commission-rate {
    padding-right: 2em;
}

.calculation-equals,
.calculation-multiply {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-color, #4166E1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 16px 0;
}

.earnings-result {
    text-align: center;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    container-type: inline-size;
    container-name: earnings-result;
}

.earnings-amount {
    font-size: clamp(1.5rem, 7cqi, 2.5rem);
    font-weight: 700;
    color: var(--primary-color, #4166E1);
    background: linear-gradient(135deg, var(--primary-color, #4166E1), #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Range Slider */
.slider-container {
    margin-bottom: 32px;
}

input[type="range"] {
    padding: 0;
    height: 0.8em;
    border-width: 0;

    &.spend-slider {
        width: 100%;
        height: 8px;
        border-radius: 4px;
        background: #ecf0f4;
        outline: none;
        -webkit-appearance: none;
        appearance: none;
        margin-bottom: 12px;
        cursor: pointer;
    }

    &.spend-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color, #4166E1), #667eea);
        cursor: pointer;
        border: 3px solid white;
        box-shadow: 0 4px 12px rgba(65, 102, 225, 0.3);
    }

    &.spend-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color, #4166E1), #667eea);
        cursor: pointer;
        border: 3px solid white;
        box-shadow: 0 4px 12px rgba(65, 102, 225, 0.3);
    }
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

/* Call to Action */
.calculator-cta {
    text-align: center;
    margin-bottom: 24px;
}

.cta-button {
    /* display: inline-flex; */
    /* align-items: center; */
    gap: 12px;
    /* padding: 18px 36px; */
    /* background: var(--primary-color, #4166E1) !important; */
    /* color: white !important; */
    /* text-decoration: none; */
    /* border-radius: 50px; */
    /* font-weight: 600; */
    /* font-size: 1.125rem; */
    /* transition: all 0.3s ease; */
    /* box-shadow: 0 8px 20px rgba(65, 102, 225, 0.3); */
    /* border: none; */
    /* text-transform: uppercase; */
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(65, 102, 225, 0.4);
    color: white !important;
    text-decoration: none;
    background: #3654d1 !important;
}

.cta-arrow {
    transition: transform 0.3s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

/* Average Info */
.average-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    padding: 16px;
    background: rgba(65, 102, 225, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(65, 102, 225, 0.1);
}

.info-icon {
    font-size: 1.2rem;
}

/* Illustration */
.calculator-illustration {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

.illustration-content {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    container-type: inline-size;
    container-name: illustration-content;
}

.money-stack {
    position: absolute;
    top: 0cqi;
    left: 0cqi;
}

.bill {
    width: 40cqi;
    height: 20cqi;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 2.66cqi;
    position: absolute;
    box-shadow: 0 1.33cqi 5.33cqi rgba(76, 175, 80, 0.3);
}

.bill-1 {
    transform: rotate(-5deg);
    z-index: 3;
}

.bill-2 {
    transform: rotate(5deg) translate(5.33cqi, 2.66cqi);
    z-index: 2;
}

.bill-3 {
    transform: rotate(-10deg) translate(10.66cqi, 5.33cqi);
    z-index: 1;
}

.calculator-device {
    position: absolute;
    bottom: 13.33cqi;
    right: 13.33cqi;
    width: 53.33cqi;
    height: 66.66cqi;
    background: #2c3e50;
    border-radius: 5.33cqi;
    padding: 5.33cqi;
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.3);
}

.calc-screen {
    width: 100%;
    height: 20cqi;
    background: #34495e;
    border-radius: 2.66cqi;
    margin-bottom: 5.33cqi;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2ecc71;
    font-size: 8cqi;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.screen-text {
    text-align: center;
}

.calc-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.66cqi;
}

.calc-button {
    width: 100%;
    height: 8cqi;
    background: #7f8c8d;
    border-radius: 1.33cqi;
}

.coins {
    position: absolute;
    top: 70cqi;
    left: 20cqi;
    transform: translate(-50%, -50%);
}

.coin {
    width: 16cqi;
    height: 16cqi;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 1.33cqi 5.33cqi rgba(243, 156, 18, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8cqi;
    font-weight: 700;
    color: white;
}

.coin-1 {
    transform: translate(-13.33cqi, -6.66cqi);
    z-index: 3;
}

.coin-2 {
    transform: translate(0px, 0px);
    z-index: 2;
}

.coin-3 {
    transform: translate(13.33cqi, 6.66cqi);
    z-index: 1;
}

.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.2rem;
    animation: sparkle 2s infinite ease-in-out;
}

.sparkle-1 {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
}

.sparkle-2 {
    bottom: 15%;
    left: 15%;
    animation-delay: 0.7s;
}

.sparkle-3 {
    top: 60%;
    right: 10%;
    animation-delay: 1.4s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    /* .examples-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    } */
    
    .example-card.featured {
        transform: none;
    }
}

@media (max-width: 1024px) {
    /* .calculator-content {
        grid-template-columns: 1fr;
    } */
    
    /* .calculator-sidebar {
        order: -1;
        min-height: 200px;
        padding: 30px;
    } */

    .input-row {
        gap: 10px;
    }

    
}

@media (max-width: 768px) {
    .calculator-header {
        padding: 30px 20px;
    }
    
    .calculator-title {
        font-size: 1.875rem;
    }
    
    .calculator-description {
        font-size: 1rem;
    }
    
    .calculator-main {
        padding: 30px 20px;
    }
    
    .calculator-interactive {
        padding: 24px 20px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }

    .hide-on-tablet {
        display: none;
    }
    
    /* .examples-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    } */
    
    .example-card.featured {
        transform: none;
    }
    
    .earnings-amount {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .calculator-title {
        font-size: 1.5rem;
    }
    
    .calculator-header,
    .calculator-main {
        padding: 0;
    }
    
    .calculator-interactive {
        padding: 20px 16px;
    }
    
    .cta-button {
        font-size: 1rem;
    }
    
    /* .input-wrapper input {
        padding: 14px 16px;
        font-size: 1rem;
    } */
    
    /* #referral-spend {
        padding-left: 36px;
    } */
    
    /* #commission-rate {
        padding-right: 36px;
    } */
}