/* This file is part of Moodle - http://moodle.org/
 *
 * Moodle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Moodle is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @package     local_coursecountdown
 * @copyright   2026 Jesus Antonio Jimenez Aviña <antoniomexdf@gmail.com> <antoniojamx@gmail.com>
 * @license     http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

.local-coursecountdown {
    margin: 1rem 0;
    border: 1px solid var(--lcc-green-border, #bee5c6);
    border-radius: 0.5rem;
    color: var(--lcc-green-text, #0c6522);
    background: var(--lcc-green-bg, #eaf9ed);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.local-coursecountdown__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.local-coursecountdown__remaining {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
}

.local-coursecountdown__dates {
    font-size: 0.92rem;
    opacity: 0.92;
}

.local-coursecountdown.is-green {
    color: var(--lcc-green-text, #0c6522);
    background: var(--lcc-green-bg, #eaf9ed);
    border-color: var(--lcc-green-border, #bee5c6);
}

.local-coursecountdown.is-yellow {
    color: var(--lcc-yellow-text, #725400);
    background: var(--lcc-yellow-bg, #fff5d6);
    border-color: var(--lcc-yellow-border, #ffe086);
}

.local-coursecountdown.is-red {
    color: var(--lcc-red-text, #8b0000);
    background: var(--lcc-red-bg, #ffe3e3);
    border-color: var(--lcc-red-border, #ffaaaa);
}

.local-coursecountdown__close {
    border: 0;
    background: transparent;
    color: currentColor;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: 0.75;
}

.local-coursecountdown__close:hover,
.local-coursecountdown__close:focus {
    opacity: 1;
}

.local-coursecountdown.is-blink {
    animation: local-coursecountdown-blink 1s steps(2, start) infinite;
}

@keyframes local-coursecountdown-blink {
    50% {
        opacity: 0.45;
    }
}

@media (max-width: 768px) {
    .local-coursecountdown {
        padding-right: 0.85rem;
        gap: 0.6rem;
    }

    .local-coursecountdown__remaining {
        font-size: 1rem;
    }

    .local-coursecountdown__dates {
        font-size: 0.85rem;
        word-break: break-word;
    }
}
