/**
 * Animated Date Time Display Styles
 */

.animated-datetime-container {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

#animated-datetime {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0;
    /* Remove background color to match header */
    background-color: transparent;
    margin-right: 0.5rem;
    min-width: 160px;
}

#animated-datetime .date-display {
    font-size: 0.75rem;
    margin-bottom: 2px;
}

#animated-datetime .time-display {
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

#animated-datetime .time-static {
    display: inline-block;
}

#animated-datetime .time-seconds {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
}

#animated-datetime .timezone-display {
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 2px;
}

#animated-datetime .time-seconds-animate {
    animation: seconds-pulse 0.3s ease-in-out;
}

@keyframes seconds-pulse {
    0% {
        color: inherit;
        opacity: 1;
    }
    50% {
        color: #ffc107;
        opacity: 0.8;
    }
    100% {
        color: inherit;
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #animated-datetime {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

/* Dark mode styles */
.navbar-dark #animated-datetime {
    color: #fff;
}

.navbar-light #animated-datetime {
    color: #212529;
}

/* Refresh button styles */
#refresh-time {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    outline: none;
}

#refresh-time:hover {
    color: #fff;
    transform: rotate(15deg);
}

.navbar-dark #refresh-time:hover {
    color: #fff;
}

.navbar-light #refresh-time:hover {
    color: #212529;
}

#refresh-time i {
    transition: transform 0.5s ease;
}

#refresh-time i.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}