/* Base Styles - Inherit Site Font */
.hg-announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.5;

    padding: 12px 24px;
    box-sizing: border-box;
    z-index: 99999;

    display: flex;
    justify-content: center;
    align-items: center;

    /* Soft Shadow */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    /* Animation Transitions */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* 
   THEMING LOGIC
   Default: Light Mode (Black Banner, White Text)
   Dark Mode Class: White Banner, Black Text
*/

/* Default (Light Mode) */
body .hg-announcement-bar {
    background-color: #000000;
    color: #ffffff;
}

.hg-announcement-close {
    color: rgba(255, 255, 255, 0.7);
}

.hg-announcement-close:hover {
    color: #ffffff;
}

/* Dark Mode Class Override */
html.dark-mode .hg-announcement-bar {
    background-color: #ffffff;
    color: #000000;
}

html.dark-mode .hg-announcement-close {
    color: rgba(0, 0, 0, 0.6);
}

html.dark-mode .hg-announcement-close:hover {
    color: #ff0000;
    /* Red on hover */
}

.hg-announcement-content {
    flex-grow: 1;
    padding-right: 3rem;
    /* Desktop: Space for close button */
}

.hg-announcement-close {
    position: absolute;
    right: 2rem;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.hg-announcement-close:hover {
    color: #ff0000;
    /* Red on hover */
}

/* Megaphone Icon */
.hg-announcement-icon {
    position: fixed;
    top: 20px;
    right: 2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;

    /* Outline Style */
    background-color: #ffffff;
    /* Default Light Mode Background */
    border: 2px solid currentColor;
    color: #000000;
    /* Default (Light Mode) color */

    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    /* Match theme transition exactly */
    transition: all 0.3s ease;
}

/* Mobile Optimization */
@media screen and (max-width: 768px) {

    /* Balance Padding for Center Text */
    .hg-announcement-content {
        padding-left: 3rem;
        padding-right: 3rem;
    }

    .hg-announcement-close {
        right: 2rem;
    }

    /* Move Icon to Bottom Right */
    .hg-announcement-icon {
        top: auto;
        bottom: 90px;
        /* sit above theme toggle */
    }
}

.hg-announcement-icon:hover {
    transform: scale(1.1);
    /* Matches theme hover scale */
}

.hg-announcement-icon svg {
    width: 20px;
    height: 20px;
}

/* Icon Theming */
/* Default (Light Mode) -> Black Icon, White Background */
.hg-announcement-icon {
    background-color: #ffffff;
    color: #000000;
    border-color: #000000;
}

/* Dark Mode Class -> White Icon, Dark Background */
html.dark-mode .hg-announcement-icon {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #ffffff;
}

/* Animation Classes */
.hg-announcement-bar.hg-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.hg-announcement-bar.hg-visible {
    transform: translateY(0);
    opacity: 1;
}

.hg-announcement-icon.hg-icon-hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.hg-announcement-icon.hg-icon-visible {
    transform: scale(1);
    opacity: 1;
}

/* Toggle Switch Styles for Admin */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}