/*
 * ===============================================
 * Styles for the Solo Mining Calculator
 * ===============================================
 * Add these styles to your main style.css file.
 * This replaces all previous versions.
*/

.calculator-container {
    padding: 2rem 0; 
    margin-top: 2rem;
    background-color: #fff;
}

.calculator-form {
    display: flex;
    flex-wrap: wrap; 
    gap: 1rem; 
    align-items: center; 
    justify-content: center; 
    margin: 0 auto 2rem auto; 
    padding: 1.5rem; 
    max-width: 800px; 
    
    /* A more pronounced shadow for a floating effect. */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px; 
}

.calculator-form .form-label {
    font-weight: bold;
    margin-right: 0.5rem; 
    flex-shrink: 0; /* Prevents the label from shrinking */
}

.calculator-form input[type="text"] {
    /* Replaced fixed width with flexbox properties for responsiveness */
    flex: 1 1 200px; /* Allows the input to grow and shrink, with a base size */
    min-width: 150px; /* Prevents it from becoming too small */
    border: 1px solid #ccc; 
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: 4px;
}

.calculator-form select,
.calculator-form button {
    border: 1px solid #ccc; 
    padding: 0.75rem;
    font-size: 1rem;
    background-color: #fff;
    border-radius: 4px;
    flex-shrink: 0; /* Prevents button/select from shrinking */
}

.calculator-form button {
    background-color: #FFD700;
    color: #000;
    border-color: #FFD700;
    padding: 0.75rem 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calculator-form button:hover {
    background-color: #333;
}


/* --- Info and Results Grids --- */

.calculator-results-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.info-display-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0; /* Light separator line */
}

.info-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: normal;
    color: #6c757d;
}

.info-item p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    word-wrap: break-word;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.result-card,
.info-item { /* Grouped selector to apply same style */
    background-color: #fafafa;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 8px; 
}

.card-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.card-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.result-card .result-percent {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.result-card .result-one-in {
    font-size: 0.9rem;
    color: #6c757d;
    word-wrap: break-word;
}

/* --- Tooltip Styles --- */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #dc3545; /* Light red for all tooltips */
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 160px; /* Increased width for longer text */
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -80px; /* Centered with new width */
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

/* For mobile tap */
.tooltip .tooltip-text.show-tooltip {
    visibility: visible;
    opacity: 1;
}

/* For desktop hover - use a media query to avoid conflicts on touch devices */
@media (hover: hover) and (pointer: fine) {
    .tooltip:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }
}

/* --- Results Explanation Box --- */
.results-explanation {
    margin-top: 2rem;
    padding: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: left;
}

.results-explanation h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #212529;
}

.results-explanation p {
    margin: 0 0 0.5rem 0;
    line-height: 1.5;
}

.results-explanation p:last-child {
    margin-bottom: 0;
}


/* Responsive adjustments for grids */
@media (max-width: 768px) {
    .info-display-box {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}