/* === Base Styles ================================================== */

body {
    color: #ffffff;
    background-color: #0072C6;
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

#container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0 60px;
    box-sizing: border-box;
}

.logo {
    display: block;
    margin: 6px 30px 20px;
    height: 24px;
    width: auto;
    shape-rendering: geometricPrecision;
}

/* Standardized 630px width for both Title Box and IE Banner */
.title-box {
    margin: 0 16px;
    width: 630px;
    max-width: calc(100% - 32px);
    height: 82px;
    background-color: #00bcf2;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding-left: 14px;
}

.title-box h1 {
    margin: 0;
    padding: 0;
    font-size: 42px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-box h1 .welcome-prefix {
    font-size: 30px;
    font-weight: 300;
    margin-right: 8px;
    flex-shrink: 0;
}

#welcome-click {
    cursor: pointer;
    user-select: none;
}

#welcome-click:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

#welcome-click.disabled       { cursor: default; }
#welcome-click.disabled:hover { text-decoration: none; }

.construction-text {
    margin: 22px 0 0 30px;
    font-size: 18px;
    font-weight: 300;
    color: #ffffff;
}

/* === IE Banner ==================================================== */

#ie-banner {
    display: none;
    margin: 4px 16px 0;
    width: 630px;
    max-width: calc(100% - 32px);
    background-color: #ffcc00;
    color: #000;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    padding: 6px 10px;
    border: 1px solid #ccaa00;
    box-sizing: border-box;
}

/* === Clippy ======================================================= */

#clippy-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 9999;
}

#clippy-bubble {
    position: relative;
    background: #fffde7;
    border: 2px solid #bbb;
    border-radius: 8px;
    padding: 10px 30px 10px 12px;
    max-width: 230px;
    min-width: 160px;
    margin-bottom: 12px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.30);
    font-size: 13px;
    color: #222;
    line-height: 1.45;
    font-family: "Segoe UI", Arial, sans-serif;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#clippy-bubble.visible {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

#clippy-container:hover #clippy-bubble.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#clippy-bubble::before {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 26px;
    border-width: 14px 9px 0;
    border-style: solid;
    border-color: #bbb transparent transparent;
}

#clippy-bubble::after {
    content: '';
    position: absolute;
    bottom: -12px;
    right: 27px;
    border-width: 12px 8px 0;
    border-style: solid;
    border-color: #fffde7 transparent transparent;
}

#clippy-close {
    position: absolute;
    top: 5px;
    right: 7px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #999;
    line-height: 1;
    padding: 2px;
    font-family: Arial, sans-serif;
}
#clippy-close:hover { color: #333; }

#clippy-svg-wrap {
    cursor: pointer;
    display: block;
    margin-right: -4px;
    animation: clippy-bob 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#clippy-container:hover #clippy-svg-wrap {
    opacity: 1;
}

/* === Web Buttons (IE Only, Bottom Left) ============================ */

#web-buttons {
    position: fixed;
    bottom: 24px;
    left: 24px;
    display: none;
    gap: 4px;
    z-index: 9999;
}

#web-buttons a {
    display: block;
    line-height: 0;
    position: relative;
}

/* Cross-browser click animation, with JS-assisted .pressed support for IE */
#web-buttons a:active img,
#web-buttons a.pressed img {
    position: relative;
    top: 2px;
}

#web-buttons img {
    display: block;
    width: 88px;
    height: 31px;
    border: 1px solid rgba(0,0,0,0.4);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#web-buttons img:hover {
    border-color: rgba(255,255,255,0.6);
    filter: brightness(1.1);
}

/* === Animations =================================================== */

#clippy-svg-wrap.wiggling {
    animation: clippy-wiggle 0.5s ease-in-out forwards;
}

@keyframes clippy-bob {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-7px); }
}

@keyframes clippy-wiggle {
    0%   { transform: rotate(0deg); }
    20%  { transform: rotate(-11deg); }
    45%  { transform: rotate(11deg); }
    65%  { transform: rotate(-6deg); }
    82%  { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

/* === Mobile Defaults ============================================== */

@media (max-width: 600px) {
    .logo {
        margin-left: 14px;
        margin-bottom: 14px;
        height: 20px;
    }
    .title-box {
        margin: 0 10px;
        height: auto;
        min-height: 60px;
        padding: 10px 12px;
    }
    .title-box h1 {
        font-size: 22px;
        white-space: normal;
        flex-wrap: wrap;
        letter-spacing: -0.2px;
    }
    .title-box h1 .welcome-prefix { font-size: 16px; }
    .construction-text {
        margin-left: 14px;
        font-size: 15px;
    }
    #clippy-container { bottom: 14px; right: 12px; }
    #clippy-bubble { max-width: 185px; font-size: 12px; }
    #clippy-svg-wrap img { width: 70px; height: auto; }
    #web-buttons { bottom: 14px; left: 14px; }
    #web-buttons img { width: 72px; height: 25px; }
}

/* === Specific IE Compatibility Overrides ========================== */

.ie .title-box {
    display: table;
    padding-left: 0;
}
.ie .title-box h1 {
    display: table-cell;
    vertical-align: middle;
    padding-left: 14px;
}
.ie #ie-banner {
    display: block;
}
.ie #web-buttons {
    display: block;
    left: 24px;
    -ms-transform: none;
    transform: none;
    white-space: nowrap;
}
.ie #web-buttons a {
    display: inline-block;
    vertical-align: top;
    margin-right: 4px;
    background-color: transparent;
    top: 0;
}
.ie #web-buttons a:active,
.ie #web-buttons a.pressed {
    top: 0;
}
.ie #web-buttons a:active img,
.ie #web-buttons a.pressed img {
    position: relative;
    top: 2px;
}
.ie #web-buttons a:last-child {
    margin-right: 0;
}
.ie #clippy-container {
    display: none;
}
@media (max-width: 600px) {
    .ie #web-buttons { left: 14px; }
}
