/* Core Layout */
.calculator-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 80px;
}

.calculator-wrapper {
    background: #fff;
    padding: 40px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.calculator-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shaddow);
}

/* Form Styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #000;
}

.form-group input:focus {
    outline: none;
    border-color: var(--blue-fisagency);
    box-shadow: 0 0 0 3px rgba(44, 69, 125, 0.1);
}

/* Input hint styling */
.input-hint {
    font-size: 12px;
    color: var(--body-display);
    margin-top: 4px;
    transition: color 0.3s ease;
}

.form-group.error .input-hint {
    color: var(--red-warning);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    width: 100%;
}

.calculate-button,
.reset-button {
    padding: 14px 24px;
    border-radius: 2px;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.calculate-button {
    background-color: var(--blue-fisagency);
    color: white;
    border: none;
}

.calculate-button:hover {
    background: var(--orange-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(44, 69, 125, 0.1);
}

.reset-button {
    background: white;
    color: var(--blue-fisagency);
    border: 1px solid var(--blue-fisagency);
}

.reset-button:hover {
    background: var(--grey);
    transform: translateY(-2px);
}

.calculate-button.loading {
    background: var(--blue-fisagency);
    color: transparent;
    cursor: wait;
    pointer-events: none;
}

.calculate-button.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    transform: translate(-50%, -50%);
}

/* Results Section */
.results-container {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--pinstripe);
}

.results-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    margin-bottom: 24px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.result-card {
    background: var(--grey);
    padding: 24px;
    border-radius: 2px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: var(--blue-fisagency);
    margin-top: 8px;
}

.result-label {
    font-size: 14px;
    color: var(--body-display);
}

/* Chart Styles */
.chart-container {
    background: white;
    padding: 32px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    margin: 30px 0;
    height: 400px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chart-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    text-align: center;
    color: #ff4b27;
    font-weight: 500;
    background-color: rgba(255, 75, 39, 0.05);
    border: 1px dashed #ff4b27;
    border-radius: 4px;
}

.break-even-marker {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue-fisagency);
    border: 1px solid var(--pinstripe);
    z-index: 10;
}

.no-break-even-marker {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #ff4b27;
    border: 1px solid #ff4b27;
    z-index: 10;
}

.break-even-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #4CAF50;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #4CAF50;
    transform: translate(-50%, -50%);
    z-index: 20;
    display: none;
    pointer-events: none;
}

.break-even-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: rgba(76, 175, 80, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #000;
    padding: 4px 12px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(44, 69, 125, 0.05);
}

.legend-color {
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

.legend-color.investment {
    background: #FF6B6B;
}

.legend-color.revenue {
    background: #2C457D;
}

/* Responsive Design */
@media screen and (max-width: 991px) {
    .calculator-container {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .calculator-wrapper {
        padding: 24px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .calculate-button,
    .reset-button {
        padding: 14px 20px;
        font-size: 14px;
        width: 100%;
        height: 44px;
    }
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Break-Even Specific Styles */
.recommendation {
    background: var(--grey);
    padding: 24px;
    border-radius: 2px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--black);
    margin-top: 32px;
    white-space: pre-line;
}

.recommendation.risk-low {
    border-left: 4px solid #4CAF50;
    background-color: rgba(76, 175, 80, 0.05);
}

.recommendation.risk-moderate {
    border-left: 4px solid #FFC107;
    background-color: rgba(255, 193, 7, 0.05);
}

.recommendation.risk-moderate-high {
    border-left: 4px solid #FF9800;
    background-color: rgba(255, 152, 0, 0.05);
}

.recommendation.risk-high {
    border-left: 4px solid #F44336;
    background-color: rgba(244, 67, 54, 0.05);
}

/* Service Badge */
.service-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 100px;
    margin-top: 16px;
}

.service-badge.value {
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 90%);
    box-shadow: 0 2px 12px rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-text {
    font-size: 10.5px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-family: Poppins, sans-serif;
    opacity: 0.95;
}

/* Timeline visualization styles */
.timeline-bar {
    height: 8px;
    background: var(--grey);
    border-radius: 4px;
    margin: 24px 0;
    position: relative;
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: var(--blue-fisagency);
    border-radius: 4px;
    transition: width 1s ease-out;
}

/* FAQ Section Enhancements */
.faq-section {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--pinstripe);
}

.faq-header {
    text-align: center;
    margin-bottom: 48px;
}

.faq-header h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--black);
}

.faq-header p {
    font-size: 17px;
    color: var(--body-display);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.faq-item {
    background: #fff;
    padding: 24px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 69, 125, 0.08);
}

.faq-question {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--black);
}

.faq-answer {
    font-size: 15px;
    line-height: 1.6;
    color: var(--body-display);
}

.faq-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.faq-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--body-display);
    line-height: 1.5;
}

.faq-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--blue-fisagency);
}

/* CTA Section Styles */
.cta-section {
    margin-top: 80px;
    padding: 64px;
    background: linear-gradient(135deg, var(--blue-fisagency) 0%, #3A5CA7 100%);
    border-radius: 2px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at top right,
        rgba(44, 69, 125, 0.15),
        transparent 50%
    );
    animation: pulse 8s ease-in-out infinite reverse;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: white;
    margin-bottom: 16px;
    font-size: 32px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 17px;
    margin-bottom: 32px;
}

.link-arrow {
    color: white;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-arrow:hover {
    opacity: 0.9;
    transform: translateX(4px);
}

/* Additional Responsive Styles */
@media screen and (max-width: 991px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-section {
        padding: 40px 24px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
}

@media screen and (max-width: 767px) {
    .faq-header h2 {
        font-size: 24px;
    }
    
    .faq-item {
        padding: 20px;
    }
}

/* Enhanced Result Card Animations */
.result-card:nth-child(1) { animation-delay: 0.1s; }
.result-card:nth-child(2) { animation-delay: 0.2s; }
.result-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chart Tooltip */
.chart-tooltip {
    position: fixed;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    font-size: 12px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 100;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-content div {
    color: #000;
    white-space: nowrap;
}

/* Share Button */
.share-container {
    margin-top: 24px;
    text-align: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.share-button svg {
    transition: transform 0.3s ease;
}

.share-button:hover svg {
    transform: translateY(-2px);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    background: #000;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Print Styles */
@media print {
    .calculator-form,
    .calculator-info,
    .cta-section,
    .faq-section,
    .footer-section {
        display: none;
    }
    
    .results-container {
        page-break-inside: avoid;
    }
    
    .chart-container {
        margin: 0;
        border: none;
    }
    
    .result-card {
        break-inside: avoid;
    }
}

/* Update hover effect */
.info-card:hover .service-badge {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
}

/* Info Card Styles */
.calculator-info {
    align-self: start;
}

.info-card {
    background: #fff;
    padding: 32px;
    border: 1px solid var(--pinstripe);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shaddow);
}

.info-card h3 {
    color: #000;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
}

.info-card p {
    color: var(--body-display);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    color: var(--body-display);
    font-size: 14px;
    line-height: 1.5;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--blue-fisagency);
    font-weight: 600;
} 