/* ============================================
 * CSS-DATEI: calculator-style.css
 * Income Calculator for Income Skill Lab
 * ============================================ */

.calculator-section {
    background: #00194c;
    color: #fff;
    padding: 40px 0;
}

/* Elementor Editor specific styles */
.elementor-editor-active .calculator-section,
.elementor-editor-preview .calculator-section {
    min-height: 200px;
}

.calculator-section .content-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

.calculator-section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.calculator-section h2 + p {
    text-align: center;
    margin-bottom: 25px;
    font-size: 16px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.85);
}

.calc-block {
    border-top: 1px dashed rgba(0, 85, 255, 0.4);
    padding-top: 25px;
}

.calc-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 40px;
}

.left-section {
    flex: 0 0 auto;
}

.right-section {
    flex: 1;
    min-width: 0;
}

.yearly-total-inline {
    margin-top: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0055ff 0%, #0033aa 100%);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.yearly-total-inline .yt-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.yearly-total-inline .yt-value {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

/* Mobile: Ensure yearly-total-inline matches button width */
@media screen and (max-width: 900px) {
    .yearly-total-inline {
        max-width: 220px;
    }
}

.get-input-wrap .cfield {
    margin-bottom: 15px;
}

.get-input-wrap .cfield label {
    font-size: 14px;
    display: block;
    margin-bottom: 6px;
    line-height: 1.4;
}

.get-input-wrap .cfield .label-wrap {
    display: block;
}

.get-input-wrap .cfield .input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.get-input-wrap .cfield .input-wrap.has-prefix {
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    font-size: 16px;
    font-weight: normal;
    color: #333;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.get-input-wrap .cfield .input-wrap.has-prefix input {
    padding-left: 28px;
}

.get-input-wrap .cfield input {
    width: 120px;
    height: 44px;
    padding: 0 12px;
    border: 2px solid rgba(0, 85, 255, 0.5);
    border-radius: 6px;
    font-size: 16px;
    text-align: left;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
}

.get-input-wrap .cfield input:focus {
    outline: none;
    border-color: #0055ff;
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.25);
}

.get-input-wrap .cfield input::-webkit-inner-spin-button,
.get-input-wrap .cfield input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.get-input-wrap .cfield input[type=number] {
    -moz-appearance: textfield;
}

.tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-wrap span {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0055ff;
    border-radius: 100%;
    cursor: pointer;
    color: #0055ff;
    font-size: 12px;
    font-weight: bold;
    background: rgba(0, 85, 255, 0.1);
    transition: all 0.3s ease;
}

.tooltip-wrap span:hover {
    background: #0055ff;
    color: #fff;
}

.tooltip {
    background-color: #fff;
    color: #00194c;
    font-size: 13px;
    line-height: 18px;
    width: 240px;
    padding: 12px 15px;
    position: absolute;
    text-align: left;
    left: 50%;
    transform: translateX(-50%);
    bottom: 35px;
    display: none;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.tooltip:before {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    width: 0;
    content: '';
}

.tooltip-wrap span:hover + .tooltip {
    display: block;
}

.final-btn {
    padding-top: 10px;
    width: 100%;
}

.final-btn button {
    border: 2px solid #fff;
    background: transparent;
    border-radius: 6px;
    padding: 10px 30px;
    font-size: 15px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
}

button.clear-btn {
    margin-right: 10px;
}

button.submit-btn {
    background: #0055ff;
    color: #fff;
    border-color: #0055ff;
}

button.submit-btn:hover {
    background: #0044cc;
    border-color: #0044cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 85, 255, 0.4);
}

button.clear-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.yearly-income {
    width: 140px;
    height: 140px;
    border-radius: 100%;
    background: linear-gradient(135deg, #0077ff 0%, #0055ff 50%, #0033aa 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0, 85, 255, 0.5);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.yearly-income h3 {
    color: #fff;
    text-align: center;
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}

.yearly-income p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    margin: 3px 0 0;
    text-align: center;
    line-height: 1.2;
    padding: 0 10px;
}

.circle-icon {
    position: absolute;
    border-radius: 100%;
    background: #0055ff;
    opacity: 0.35;
}

.circle-icon.cicon1 {
    width: 35px;
    height: 35px;
    left: -10px;
    bottom: -30px;
}

.circle-icon.cicon2 {
    width: 25px;
    height: 25px;
    right: -30px;
    top: 15px;
}

.circle-icon.cicon3 {
    width: 12px;
    height: 12px;
    right: 60px;
    top: -36px;
}

.calc-pbar {
    height: 230px;
    width: 100%;
}

.calc-pbar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 100%;
    position: relative;
    padding-bottom: 30px;
    border-bottom: 1px dashed rgba(0, 85, 255, 0.4);
}

.calc-pbar-wrap .cbar-wrap {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.calc-pbar-wrap .cbar {
    width: 24px;
    background: rgba(0, 85, 255, 0.25);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 0.5s ease, background 0.3s ease;
    min-height: 6px;
}

.calc-pbar-wrap .cbar.bar-active {
    background: linear-gradient(180deg, #66aaff 0%, #0055ff 100%);
}

.calc-pbar-wrap .cbar.bar-active:hover {
    background: linear-gradient(180deg, #88ccff 0%, #0077ff 50%, #0044cc 100%);
    box-shadow: 0 0 20px rgba(0, 85, 255, 0.5);
}

.calc-pbar-wrap .cbar .barvalue {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
}

.calc-pbar-wrap .cbar .month {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.calc-pbar-wrap .cbar .bar-tooltip {
    background-color: #fff;
    color: #00194c;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 14px;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 6px;
    display: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.calc-pbar-wrap .cbar:hover .bar-tooltip {
    display: block;
}

.calc-pbar-wrap .cbar .bar-tooltip:before {
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
    width: 0;
    content: '';
}

.progress-note {
    padding: 15px 20px;
    border: 1px solid rgba(0, 85, 255, 0.3);
    border-radius: 8px;
    margin-top: 25px;
    background: rgba(0, 85, 255, 0.08);
}

.progress-note p {
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.progress-note p strong {
    color: #66aaff;
}


/* Tablet and below: Vertical layout */
@media screen and (max-width: 900px) {
    .calc-row {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .left-section {
        width: 100%;
    }
    
    .right-section {
        width: 100%;
    }
    
    .calc-pbar {
        height: 200px;
        margin-top: 10px;
    }
    
    .calc-pbar-wrap {
        padding-top: 50px;
    }
    
    .calc-pbar-wrap .cbar .barvalue {
        font-size: 11px;
    }
}

@media screen and (max-width: 767px) {
    .calculator-section {
        padding: 30px 0;
    }
    
    .calculator-section h2 {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .calculator-section h2 + p {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .calc-block {
        padding-top: 15px;
    }
    
    .get-input-wrap .cfield {
        margin-bottom: 12px;
    }
    
    .get-input-wrap .cfield label {
        font-size: 13px;
    }
    
    .final-btn {
        padding-top: 8px;
    }
    
    .final-btn button {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    .yearly-income {
        width: 110px;
        height: 110px;
    }
    
    .yearly-income h3 {
        font-size: 16px;
    }
    
    .yearly-income p {
        font-size: 9px;
        padding: 0 8px;
    }
    
    .calc-pbar {
        height: 160px;
    }
    
    .calc-pbar-wrap {
        padding-top: 45px;
        padding-bottom: 25px;
    }
    
    .calc-pbar-wrap .cbar {
        width: 16px;
    }
    
    .calc-pbar-wrap .cbar .month {
        font-size: 8px;
    }
    
    .calc-pbar-wrap .cbar .barvalue {
        display: none !important;
    }
    
    .calc-pbar-wrap .cbar .bar-tooltip {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    .progress-note {
        margin-top: 15px;
        padding: 10px 12px;
    }
    
    .progress-note p {
        font-size: 11px;
    }
    
    .yearly-result {
        margin-top: 15px;
    }
}

@media screen and (max-width: 480px) {
    .calculator-section {
        padding: 30px 0;
    }
    
    .calculator-section .content-wrap {
        padding: 0 15px;
    }
    
    .calculator-section h2 {
        font-size: 20px;
    }
    
    .calculator-section h2 + p {
        font-size: 13px;
    }
    
    .get-input-wrap .cfield input {
        width: 100%;
        max-width: 150px;
    }
    
    .final-btn button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    button.clear-btn {
        margin-right: 8px;
    }
    
    .calc-pbar {
        height: 150px;
    }
    
    .calc-pbar-wrap .cbar {
        width: 14px;
    }
    
    .calc-pbar-wrap .cbar .month {
        font-size: 8px;
    }
    
    .yearly-income {
        width: 100px;
        height: 100px;
    }
    
    .yearly-income h3 {
        font-size: 16px;
    }
    
    .yearly-income p {
        font-size: 9px;
    }
    
    .tooltip {
        width: 180px;
        font-size: 11px;
        padding: 8px 10px;
        left: 0;
        transform: translateX(0);
    }
    
    .tooltip:before {
        left: 20px;
        transform: none;
    }
}
