/* Enhanced Modern Header - Login Page Theme for Government Use */

#header {
    background: #008E76;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2000;
}

/* Tanzania flag colors accent bar at top */
#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg,
        #32AD49 0%,
        #32AD49 33%,
        #000000 33%,
        #000000 66%,
        #FDE850 66%,
        #FDE850 100%
    );
    z-index: 1;
}

#header #logo {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 270px;
    max-height: 100%;
    padding: 4px 0;
    overflow: hidden;
    position: relative;
    z-index: 200;
}

#header #logo img {
    max-height: 72px;
    width: auto;
    margin: 4px 2px;
    transition: transform 0.3s ease;
}

#header #logo img:hover {
    transform: scale(1.05);
}

#header #logo img#logo-gca {
    max-height: 65px;
    margin: 7px 2px;
    opacity: 1;
}

#header #title {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
}

#header h1 {
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
    padding-left: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Icons Section */
#icons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 1 auto;
}

.icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

#header .fa {
    font-size: 32px;
    color: #ffffff;
    background: #ffffff;
    width: 1em;
    height: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    mask-size: cover;
    mask-repeat: no-repeat;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

#header .fa:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

#header .fa:active {
    transform: translateY(0);
}

/* Icon masks */
#header .fa.fa-question {
    transform: translateY(3px);
    mask: url("../img/svg/message-question-outline.svg");
    -webkit-mask-image: url("../img/svg/message-question-outline.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-question:hover {
    transform: translateY(1px) scale(1.08);
}

#header .fa.fa-sign-out {
    mask: url("../img/svg/sign-out.svg");
    -webkit-mask-image: url("../img/svg/sign-out.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-cog {
    mask: url("../img/svg/cog.svg");
    -webkit-mask-image: url("../img/svg/cog.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-login {
    mask: url("../img/svg/login.svg");
    -webkit-mask-image: url("../img/svg/login.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-share-o {
    mask: url("../img/svg/share-o.svg");
    -webkit-mask-image: url("../img/svg/share-o.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-print {
    mask: url("../img/svg/print.svg");
    -webkit-mask-image: url("../img/svg/print.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-envelope {
    mask: url("../img/svg/envelope.svg");
    -webkit-mask-image: url("../img/svg/envelope.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-copy {
    mask: url("../img/svg/copy-content.svg");
    -webkit-mask-image: url("../img/svg/copy-content.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

#header .fa.fa-book {
    mask: url("../img/svg/book.svg");
    -webkit-mask-image: url("../img/svg/book.svg");
    mask-size: contain;
    -webkit-mask-size: contain;
}

/* Language Selector */
#header form {
    display: inline-block;
}

#header #language-selector {
    height: 36px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#header #language-selector:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

#header #language-selector:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

#header #language-selector option {
    background-color: #008E76;
    color: #ffffff;
    padding: 8px;
}

/* Share Box */
#header #share-box {
    display: none;
    z-index: 3000;
    padding: 14px 18px;
    background-color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    position: fixed;
    margin-top: 80px;
    right: 120px;
    border: 1px solid rgba(0, 142, 118, 0.2);
}

#header #share-box input {
    margin-right: 12px;
    padding: 10px 14px;
    border: 2px solid #F3F5F7;
    border-radius: 8px;
    font-size: 13px;
    min-width: 300px;
    transition: border-color 0.3s ease;
    background-color: #F3F5F7;
}

#header #share-box input:focus {
    outline: none;
    border-color: #008E76;
    background-color: #ffffff;
}

#header #copy-link {
    cursor: pointer;
    color: #008E76;
    transition: opacity 0.3s ease;
    font-size: 18px;
}

#header #copy-link:hover {
    opacity: 0.7;
}

#header #copy-link:active {
    opacity: 0.5;
}

/* Intro.js checkbox styling */
.introjs-tooltip input[type=checkbox] {
    accent-color: #008E76;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #header h1 {
        font-size: 22px;
    }

    #header {
        height: 75px;
        padding: 0 24px;
    }

    #icons {
        gap: 14px;
    }
}

@media (max-width: 768px) {
    #header {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
    }

    #header #title {
        order: 3;
        flex: 1 1 100%;
        margin-top: 8px;
    }

    #header h1 {
        font-size: 18px;
    }
}
