/*
 * msn_signup.css
 * MSN Messenger 7 window skin for the Idlepimps signup page.
 *
 * THEMING: every colour and size lives in :root — change values here
 * without touching anything else. NPC name lives in msn_signup.js CFG.
 *
 * Place this file so it is reachable at /home/msn_signup.css
 * (same directory as signup.php).
 */

/* ── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
    /* Window dimensions */
    --msn-w:         500px;
    --msn-right-w:   76px;
    --msn-chat-h:    215px;
    --msn-input-h:   64px;

    /* Title bar gradient */
    --c-title-a:     #003399;
    --c-title-b:     #2b7de8;

    /* Contact / toolbar strip */
    --c-contact-a:   #d8eafc;
    --c-contact-b:   #bcd4f0;
    --c-contact-bdr: #8aafd4;
    --c-toolbar-a:   #eaf1fb;
    --c-toolbar-b:   #dde8f6;
    --c-toolbar-bdr: #c0d4ec;

    /* Chat */
    --c-chat-bg:     #ffffff;

    /* Right avatar column */
    --c-right-a:     #aac4de;
    --c-right-b:     #7aaac8;
    --c-right-bdr:   #7aabcf;
    --c-av-bg-a:     #b8d0e8;
    --c-av-bg-b:     #7098c0;
    --c-av-fg:       rgba(46, 82, 134, 0.84);

    /* Message colours */
    --c-npc:         #990000;
    --c-player:      #000099;

    /* Divider */
    --c-div-a:       #ddeaf8;
    --c-div-b:       #eef4fc;
    --c-div-bdr:     #9ab8d4;

    /* Buttons */
    --c-btn-a:       #f4f4f4;
    --c-btn-b:       #d4d4d4;
    --c-btn-bdr:     #909090;

    /* Status bar */
    --c-status-a:    #dce8f8;
    --c-status-b:    #ccd8ec;
    --c-status-bdr:  #9ab4d0;
}

/* ── Scoped Reset ───────────────────────────────────────────────────────────── */
#msn-window,
#msn-window * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Outer Window ───────────────────────────────────────────────────────────── */
#msn-window {
    width: 95%;
    max-width: var(--msn-w);
    margin: 28px auto;
    border: 2px solid #446699;
    box-shadow: 3px 4px 16px rgba(0, 0, 0, 0.55);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #000;
    background: var(--c-chat-bg);
}

/* ── Title Bar ──────────────────────────────────────────────────────────────── */
#msn-titlebar {
    height: 26px;
    background: linear-gradient(90deg,
        var(--c-title-a) 0%,
        var(--c-title-b) 50%,
        var(--c-title-a) 100%
    );
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 5px;
}

.msn-logo {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

.msn-title {
    flex: 1;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msn-wincontrols {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.msn-wbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 15px;
    font-size: 8px;
    font-weight: bold;
    line-height: 1;
    background: linear-gradient(180deg, #e8f0f8 0%, #b0c8e0 100%);
    border: 1px solid #6888a8;
    color: #000;
    cursor: pointer;
    font-family: Tahoma, Arial, sans-serif;
    user-select: none;
}

.msn-wbtn:hover {
    background: linear-gradient(180deg, #f4f8ff 0%, #c8e0f4 100%);
}

.msn-close-btn {
    background: linear-gradient(180deg, #f88 0%, #c44 100%);
    color: #fff;
    border-color: #944;
}

.msn-close-btn:hover {
    background: linear-gradient(180deg, #faa 0%, #d66 100%);
}

/* ── Two-Column Layout ──────────────────────────────────────────────────────── */
#msn-content {
    display: flex;
    align-items: stretch;
}

#msn-left-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--c-right-bdr);
    min-width: 0;
}

#msn-right-col {
    width: var(--msn-right-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--c-right-a) 0%, var(--c-right-b) 100%);
    display: flex;
    flex-direction: column;
}

/* ── Contact Bar ────────────────────────────────────────────────────────────── */
#msn-contact-bar {
    background: linear-gradient(180deg, var(--c-contact-a) 0%, var(--c-contact-b) 100%);
    border-bottom: 1px solid var(--c-contact-bdr);
    padding: 7px 8px;
    flex-shrink: 0;
}

.msn-contact-name-txt {
    font-size: 14px;
    font-weight: bold;
    color: #002266;
    line-height: 1.2;
}

.msn-contact-status-txt {
    font-size: 10px;
    color: #336699;
    margin-top: 2px;
}

/* ── Toolbars ───────────────────────────────────────────────────────────────── */
.msn-toolbar-row {
    background: linear-gradient(180deg, var(--c-toolbar-a) 0%, var(--c-toolbar-b) 100%);
    border-bottom: 1px solid var(--c-toolbar-bdr);
    height: 27px;
    display: flex;
    align-items: center;
    padding: 0 3px;
    gap: 1px;
    flex-shrink: 0;
}

.msn-ticon {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 2px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.msn-ticon:hover {
    background: rgba(255, 255, 255, 0.72);
    outline: 1px solid #9ab8d8;
}

/* The "A" font button is text, not emoji */
.msn-font-btn {
    font-family: 'Times New Roman', Georgia, serif;
    font-size: 15px;
    font-weight: bold;
    font-style: italic;
    color: #222;
}

.msn-tsep {
    width: 1px;
    height: 17px;
    background: #a4bcd8;
    margin: 0 2px;
    flex-shrink: 0;
}

/* ── Chat Area ──────────────────────────────────────────────────────────────── */
#msn-chat-wrap {
    position: relative;
    flex-shrink: 0;
}

#msn-connect-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(232, 240, 250, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

#msn-connect-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: linear-gradient(180deg, #ffffff 0%, #e4eefb 100%);
    border: 1px solid #9ab8d4;
    border-radius: 3px;
    box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.18);
}

#msn-connect-icon {
    font-size: 26px;
    animation: msn-connect-pulse 1.4s ease-in-out infinite;
}

#msn-connect-text {
    font-size: 12px;
    font-weight: bold;
    color: #003399;
}

@keyframes msn-connect-pulse {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%      { opacity: 0.6; transform: scale(0.92); }
}

#msn-chat-area {
    height: var(--msn-chat-h);
    overflow-y: scroll;
    padding: 6px 8px;
    background: var(--c-chat-bg);
    flex-shrink: 0;
}

/* Approximate Windows XP scrollbar */
#msn-chat-area::-webkit-scrollbar         { width: 17px; }
#msn-chat-area::-webkit-scrollbar-track   { background: #f0f0f0; border-left: 1px solid #c0c0c0; }
#msn-chat-area::-webkit-scrollbar-thumb   {
    background: linear-gradient(90deg, #d4d4dc 0%, #b4b4bc 100%);
    border: 1px solid #909098;
}
#msn-chat-area::-webkit-scrollbar-button  {
    background: linear-gradient(180deg, #e4e4ec 0%, #c4c4cc 100%);
    border: 1px solid #909098;
    height: 17px;
    display: block;
}

.msn-message {
    margin-bottom: 3px;
    line-height: 1.35;
}

.msn-sender {
    font-weight: bold;
}

.npc-sender    { color: var(--c-npc); }
.player-sender { color: var(--c-player); }

.msn-text {
    padding-left: 14px;
    color: #000;
    word-break: break-word;
    user-select: text;
}

/* ── Typing Indicator ───────────────────────────────────────────────────────── */
#msn-typing {
    height: 17px;
    line-height: 17px;
    padding: 0 8px;
    font-size: 10px;
    font-style: italic;
    color: #888;
    background: var(--c-chat-bg);
    border-top: 1px dotted #dde;
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* ── Divider ────────────────────────────────────────────────────────────────── */
#msn-divider {
    height: 9px;
    background: linear-gradient(180deg, var(--c-div-a) 0%, var(--c-div-b) 100%);
    border-top: 1px solid var(--c-div-bdr);
    border-bottom: 1px solid var(--c-div-bdr);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

#msn-divider-dots {
    width: 100%;
    height: 3px;
    background-image: radial-gradient(circle, #8aacc8 1px, transparent 1px);
    background-size: 7px 3px;
    opacity: 0.55;
}

/* ── Input Zone ─────────────────────────────────────────────────────────────── */
#msn-input-zone {
    height: var(--msn-input-h);
    padding: 4px;
    background: var(--c-chat-bg);
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

#msn-input,
#msn-input-pwd {
    width: 100%;
    border: none;
    outline: none;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #000;
    background: transparent;
    padding: 0;
}

#msn-input {
    height: 100%;
    resize: none;
}

#msn-input-pwd {
    height: 22px;
    margin-top: 20px; /* vertical centre inside the input zone */
    display: none;
}

/* ── Right Column: Avatar Sections ──────────────────────────────────────────── */
.msn-avatar-section {
    padding: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

#msn-npc-av {
    background: linear-gradient(180deg, var(--c-right-a) 0%, #9ab8d0 100%);
    border-bottom: 1px solid var(--c-right-bdr);
}

#msn-right-spacer {
    flex: 1;
    background: linear-gradient(180deg, #9ab8d0 0%, #88aac8 100%);
    min-height: 10px;
}

#msn-player-av {
    background: linear-gradient(180deg, #88aac8 0%, #7098b8 100%);
    border-top: 1px solid var(--c-right-bdr);
}

/* The silhouette avatar box */
.msn-avatar-box {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--c-av-bg-a) 0%, var(--c-av-bg-b) 100%);
    border: 1px solid #608ab0;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Head circle */
.av-head {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--c-av-fg);
    border-radius: 50%;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Shoulders / body ellipse */
.av-body {
    position: absolute;
    width: 46px;
    height: 32px;
    background: var(--c-av-fg);
    border-radius: 50% 50% 0 0;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.msn-av-arrow {
    font-size: 7px;
    color: #446688;
    width: 100%;
    text-align: right;
    padding-right: 1px;
    margin-top: 1px;
    line-height: 1;
    user-select: none;
}

/* ── Action Buttons (Send / Search) ─────────────────────────────────────────── */
#msn-action-btns {
    margin-top: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    align-items: center;
}

.msn-abtn {
    width: 66px;
    height: 22px;
    font-size: 11px;
    font-family: Tahoma, Arial, sans-serif;
    cursor: pointer;
    background: linear-gradient(180deg, var(--c-btn-a) 0%, var(--c-btn-b) 100%);
    border: 1px solid var(--c-btn-bdr);
    border-top-color: #e0e0e8;
    color: #000;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.18);
    user-select: none;
}

.msn-abtn:hover:not(:disabled) {
    background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
}

.msn-abtn:active:not(:disabled) {
    background: linear-gradient(180deg, #d0d0d8 0%, #c0c0c8 100%);
    box-shadow: none;
}

.msn-abtn:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ── Status Bar ─────────────────────────────────────────────────────────────── */
#msn-statusbar {
    background: linear-gradient(180deg, var(--c-status-a) 0%, var(--c-status-b) 100%);
    border-top: 1px solid var(--c-status-bdr);
    height: 19px;
    min-height: 19px;
    max-height: 19px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    font-size: 9px !important;
    color: #334;
    overflow: hidden;
}

#msn-status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    font-size: 9px !important;
}

#msn-statusbar-right {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── Terms text below the window ────────────────────────────────────────────── */
#msn-terms {
    display: block;
    text-align: center;
    color: #999;
    font-size: 0.7em;
    margin-top: 8px;
    font-family: Tahoma, Arial, sans-serif;
}

#msn-terms a {
    color: #888;
}

#msn-terms a:hover {
    color: #aaa;
}

/* ── Nudge Window-Shake Animation ───────────────────────────────────────────── */
@keyframes msn-nudge {
    0%   { transform: translateX(0); }
    12%  { transform: translateX(-7px) rotate(-0.8deg); }
    25%  { transform: translateX(7px)  rotate(0.8deg); }
    37%  { transform: translateX(-5px); }
    50%  { transform: translateX(5px); }
    62%  { transform: translateX(-3px); }
    75%  { transform: translateX(3px); }
    87%  { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

#msn-window.nudging {
    animation: msn-nudge 0.55s ease;
}

/* ── Mobile Breakpoint ──────────────────────────────────────────────────────── */
/* Shrinks the right avatar column, toolbar icons, and chat height proportionally
   so the window stays inside the viewport on phones (iPhone SE/Mini and up). */
@media (max-width: 430px) {
    #msn-window {
        width: 100%;
        margin: 10px auto;
    }

    #msn-right-col {
        width: 54px;
    }

    .msn-avatar-box {
        width: 44px;
        height: 44px;
    }

    .av-head {
        width: 17px;
        height: 17px;
        top: 7px;
    }

    .av-body {
        width: 32px;
        height: 22px;
        bottom: -4px;
    }

    .msn-abtn {
        width: 48px;
        font-size: 9px;
        height: 19px;
    }

    .msn-ticon {
        width: 19px;
        height: 19px;
        font-size: 11px;
    }

    .msn-font-btn {
        font-size: 13px;
    }

    .msn-tsep {
        height: 14px;
    }

    .msn-toolbar-row {
        height: 23px;
    }

    #msn-chat-area {
        height: 175px;
        font-size: 11px;
    }

    .msn-contact-name-txt {
        font-size: 12px;
    }

    .msn-contact-status-txt {
        font-size: 9px;
    }

    .msn-title {
        font-size: 10px;
    }
}
