/**
 * Modern Calculator Visual Enhancements
 */

/* Decorative elements */
.calculator-header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    z-index: 1;
}

/* Add calculator icon to the header */
.calculator-header h2 {
    display: flex;
    align-items: center;
}

.calculator-header h2::before {
    content: '🧮';
    font-size: 1.5rem;
    margin-right: 10px;
    animation: float 4s ease-in-out infinite;
}

/* Results styling enhancements */
.calculator-results-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--background-light);
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--card-radius) var(--card-radius) 0 0;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calculator-results-header h3 {
    margin: 0;
    font-weight: 600;
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.calculator-results-header::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: rgba(173, 134, 93, 0.15);
    border-radius: 50%;
    z-index: 1;
}

.calculator-results-body {
    padding: var(--spacing-lg);
    background-color: var(--background-light);
}

/* Styled results */
.result-block {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--input-radius);
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.main-result {
    background: linear-gradient(135deg, rgba(173, 134, 93, 0.1), rgba(173, 134, 93, 0.2));
    border-left: 4px solid var(--secondary-color);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: var(--spacing-md) 0;
}

.result-label {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

/* Result details table */
.result-details {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

.result-details th,
.result-details td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--divider-color);
}

.result-details th {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(42, 55, 90, 0.05);
}

.result-details tr:last-child td {
    border-bottom: none;
}

/* Explanation panel styling */
.explanation-panel .calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.explanation-panel .calculator-body {
    padding: var(--spacing-lg);
    max-height: 80vh;
    overflow-y: auto;
}

.explanation-panel h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--secondary-light);
    padding-bottom: var(--spacing-xs);
    display: inline-block;
}

.explanation-panel h3:first-of-type {
    margin-top: 0;
}

.explanation-panel p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

/* Info cards */
.info-card {
    background-color: rgba(42, 55, 90, 0.03);
    border-radius: var(--input-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-left: 3px solid var(--primary-color);
}

.info-card-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.info-card-title::before {
    content: 'ℹ️';
    margin-right: var(--spacing-sm);
    font-size: 1.2rem;
}

/* Close button */
.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    position: relative;
    transition: transform 0.3s ease;
}

.close-button:hover {
    transform: rotate(90deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-value {
        font-size: 2rem;
    }
    
    .calculator-header h2,
    .calculator-results-header h3 {
        font-size: 1.3rem;
    }
}
