/*
  Copyright 2025 John Greth <https://github.com/jgreth0>

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/

/* Mystery Mode Specific Styles */

/* Timer display */
.timer-display {
    margin-top: 15px;
    padding: 10px 20px;
    background: #a0522d;
    color: white;
    border-radius: 25px;
    display: inline-block;
    font-weight: 500;
}

.timer-display #countdown {
    font-size: 1.2em;
}

/* Mystery hidden elements */
.mystery-hidden {
    position: relative;
}

/* Fix status box size to accommodate longest possible text */
.stat-item#status-section {
    height: 140px; /* Fixed height */
    min-width: 220px; /* Ensure consistent width */
    max-width: 220px; /* Prevent expansion */
}

.stat-item#status-section .stat-value {
    height: 4rem; /* Fixed height for text area */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    word-wrap: break-word;
    hyphens: auto;
    overflow: hidden; /* Prevent overflow */
    line-height: 1.2;
}

.mystery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(44, 62, 80);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.mystery-text {
    color: white;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Smaller mystery text for inline elements */
.mystery-hidden#rate-units + .mystery-overlay .mystery-text,
.stat-item .mystery-overlay .mystery-text {
    font-size: 1.5rem;
}

/* Disabled slider styling */
.slider:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none; /* Prevent any interaction */
}

.slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
    background: #7f8c8d;
    pointer-events: none;
}

.slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
    background: #7f8c8d;
    pointer-events: none;
}

/* Reveal animation */
.mystery-revealed .mystery-overlay {
    opacity: 0;
    pointer-events: none;
}

.mystery-revealed .slider:disabled {
    opacity: 1;
    cursor: default;
}

/* Additional button styling */
.btn-tertiary {
    background-color: #34495e;
    color: white;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
}

.btn-tertiary:hover {
    background-color: #2c3e50;
}

/* Timer completed state */
.timer-completed {
    background: #27ae60 !important;
}

.timer-completed::before {
    content: "✓ ";
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mystery-text {
        font-size: 2rem;
    }

    .timer-display {
        font-size: 0.9rem;
    }

    .control-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .btn-tertiary {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .mystery-text {
        font-size: 1.5rem;
    }
}