/* ==========================================================================
   users.css - v2 styles for the logged-in user pages
   (profile, my shares, my shares price stats, my shares financial info,
    short message, terms of use for registered users)

   Depends on:
     base.css      body.v2 shell, .pinternal_menu, .scroll_hint, table.qt,
                   .left-col.full
     markets.css   .market_card, .table_wrap, .market_toolbar, .btn_action
     auth.css      .form_group, .form_label, .form_input, .form_row_2,
                   .form_section_title, .form_required_note, .btn_submit,
                   .btn_reset, .form_checkbox_row
   Everything below is additive - nothing here is redefined elsewhere.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. tab strip above the cards
   -------------------------------------------------------------------------- */
body.v2 .user_tabs_wrap {
    margin: 0 0 14px;
}

body.v2 .user_tabs_wrap .pinternal_menu {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   2. forms inside a .market_card
   -------------------------------------------------------------------------- */
body.v2 .user_form {
    max-width: 620px;
}

body.v2 .user_form .form_group {
    margin-bottom: 16px;
}

body.v2 .user_static_value {
    display: block;
    padding: 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2733;
}

body.v2 .form_textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 78px;
    padding: 10px 12px;
    border: 1px solid #dfe7f0;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.45;
    color: #1f2733;
    resize: vertical;
}

body.v2 .form_textarea:focus {
    outline: none;
    border-color: #1e4280;
    box-shadow: 0 0 0 3px rgba(30, 66, 128, .12);
}

body.v2 .form_textarea[readonly] {
    background: #f4f6f9;
    color: #7b8595;
}

body.v2 .form_counter {
    margin-top: 6px;
    font-size: 13px;
    color: #5b6675;
    text-align: right;
}

/* site-wide rule: form buttons sit on the right, the primary action last */
body.v2 .user_actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
}

body.v2 .user_actions .btn_submit,
body.v2 .user_actions .btn_reset {
    width: auto;
    min-width: 160px;
}

/* --------------------------------------------------------------------------
   3. notice shown when the account lacks the download right
   -------------------------------------------------------------------------- */
body.v2 .user_notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #f0dcc0;
    border-left: 4px solid #d08a2c;
    border-radius: 6px;
    background: #fdf6ec;
    font-size: 15px;
    line-height: 1.5;
    color: #6d4c14;
}

/* --------------------------------------------------------------------------
   4. watch list editor (my shares)
   -------------------------------------------------------------------------- */
body.v2 .myshares_list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    border: 1px solid #e7edf4;
    border-radius: 8px;
    overflow: hidden;
}

body.v2 .myshares_list:empty {
    display: none;
}

body.v2 .myshares_list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f7;
    font-size: 15px;
}

body.v2 .myshares_list li:last-child {
    border-bottom: 0;
}

body.v2 .myshares_list li:nth-child(even) {
    background: #f8fafc;
}

body.v2 .myshares_list .ms_name {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

body.v2 .myshares_list .ms_name a {
    color: #1e4280;
    font-weight: 600;
    text-decoration: none;
}

body.v2 .myshares_list .ms_name a:hover {
    text-decoration: underline;
}

body.v2 .ms_iconbtn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #dfe7f0;
    border-radius: 6px;
    background: #fff;
    color: #5b6675;
    cursor: pointer;
}

body.v2 .ms_iconbtn svg {
    width: 16px;
    height: 16px;
}

body.v2 .ms_iconbtn:hover {
    border-color: #c8d5e6;
    background: #f2f6fb;
    color: #1e4280;
}

body.v2 .ms_iconbtn_danger:hover {
    border-color: #e7c4c4;
    background: #fdf3f3;
    color: #b3312e;
}

body.v2 .ms_add_row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 520px;
}

body.v2 .ms_add_field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

body.v2 .ms_add_field .form_input {
    width: 100%;
    box-sizing: border-box;
}

body.v2 .ms_add_row .ms_iconbtn {
    width: 42px;
    height: 42px;
}

body.v2 .ms_add_field .searchSuggest {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 40;
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   5. toolbar / xls download button
   -------------------------------------------------------------------------- */
/* markets.css spreads .market_toolbar with space-between, which on these two
   pages parks the load button at the far right edge, a screen away from the
   dates it acts on. The three fields read as one filter, so they stay
   together at the left. */
body.v2 .user_toolbar {
    margin-bottom: 18px;
    justify-content: flex-start;
    column-gap: 22px;
}

body.v2 .user_toolbar .market_toolbar_field {
    flex-wrap: wrap;
}

body.v2 .user_toolbar .dp_field {
    width: 150px;
}

body.v2 .user_toolbar .dp_input {
    width: 100%;
    box-sizing: border-box;
}

body.v2 .card_toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
}

body.v2 .btn_xls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1d7044;
}

body.v2 .btn_xls:hover {
    background: #22834f;
}

body.v2 .btn_xls svg {
    width: 16px;
    height: 16px;
}

body.v2 .btn_xls[disabled],
body.v2 .btn_xls.is_disabled {
    background: #c3ccd8;
    color: #f3f6fa;
    cursor: default;
    pointer-events: none;
}

/* the whole filter is inert for accounts without the download right */
body.v2 .user_toolbar .btn_action[disabled],
body.v2 .user_toolbar .dp_trigger[disabled],
body.v2 .user_toolbar .dp_input[disabled] {
    background: #eef1f5;
    color: #98a2b0;
    cursor: default;
}

body.v2 .user_toolbar .btn_action[disabled] {
    background: #c3ccd8;
    color: #f3f6fa;
}

body.v2 .card_toolbar_hint {
    font-size: 15px;
    color: #5b6675;
}

/* --------------------------------------------------------------------------
   6. data tables on the my-shares pages
   -------------------------------------------------------------------------- */
body.v2 .market_card table.qt th.chk,
body.v2 .market_card table.qt td.chk {
    width: 34px;
    padding-left: 8px;
    padding-right: 4px;
    text-align: center;
}

body.v2 .market_card table.qt td.chk input[type="checkbox"],
body.v2 .market_card table.qt th.chk input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    vertical-align: middle;
}

body.v2 .market_card table.qt th.stack {
    line-height: 1.3;
}

body.v2 .market_card table.qt th.stack .chk_label {
    display: block;
    margin-top: 4px;
    font-weight: 600;
}

body.v2 .market_card table.qt td.change span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   7. short message + terms of use
   -------------------------------------------------------------------------- */
body.v2 .user_message_card {
    text-align: center;
}

body.v2 .user_message {
    margin: 0;
    padding: 18px 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.5;
    color: #1f2733;
}

body.v2 .user_content {
    font-size: 16px;
    line-height: 1.65;
    color: #2b3543;
}

body.v2 .user_content p {
    margin: 0 0 14px;
}

body.v2 .user_content ul,
body.v2 .user_content ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

body.v2 .user_content li {
    margin-bottom: 8px;
}

body.v2 .user_content a {
    color: #1e4280;
}

body.v2 .user_content table {
    max-width: 100%;
}

/* --------------------------------------------------------------------------
   8. narrow screens
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    body.v2 .user_form {
        max-width: none;
    }

    /* stacked on narrow screens - the primary action goes on top */
    body.v2 .user_actions {
        flex-direction: column-reverse;
        gap: 10px;
    }
    body.v2 .user_actions .btn_submit,
    body.v2 .user_actions .btn_reset {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    body.v2 .user_toolbar .market_toolbar_field {
        flex: 1 1 100%;
    }

    body.v2 .user_toolbar .dp_field {
        width: 100%;
    }

    body.v2 .ms_add_row {
        max-width: none;
    }

    body.v2 .btn_xls {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   under the profile form: download of the data / deletion of the profile
   (a button to the page "My data", /control/users/account). A card of its
   own, so that it is found.
   -------------------------------------------------------------------------- */
body.v2 .user_account_data {
    margin-top: 28px;
    padding: 18px 20px;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #f6f8fb;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2733;
}

body.v2 .user_account_data_title {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #1a2740;
}

body.v2 .user_account_data a {
    display: inline-block;
    margin-top: 12px;
    padding: 11px 18px;
    border-radius: 8px;
    background: #1e4280;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

body.v2 .user_account_data a:hover {
    background: #16325f;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   "My data" (screens/users/account.jsp): download of the data, deletion of
   the profile. Cards and forms are the profile's (.market_card, .user_form,
   .form_group, .btn_submit); below is only what those do not have.
   -------------------------------------------------------------------------- */
body.v2 .user_account {
    font-size: 16px;
    line-height: 1.55;
    color: #1f2733;
}

body.v2 .user_account p {
    margin: 0 0 12px;
}

body.v2 .user_account a {
    color: #1e4280;
}

body.v2 .user_account form {
    margin-top: 18px;
}

body.v2 .user_account_subtitle {
    display: block;
    margin: 26px 0 8px;
    padding-top: 20px;
    border-top: 1px solid #eef2f7;
    font-size: 18px;
    font-weight: 700;
    color: #1a2740;
}

body.v2 .user_account_list {
    margin: 0 0 12px;
    padding-left: 22px;
    list-style: disc;
}

body.v2 .user_account_list li {
    margin: 4px 0;
}

body.v2 .user_account p.user_account_note {
    margin-top: 14px;
    font-size: 14px;
    color: #5b6675;
}

body.v2 .user_account_final {
    color: #b3312e;
}

/* the reminder that the store subscription is cancelled in the store */
body.v2 .user_account_box {
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #dfe7f0;
    border-radius: 10px;
    background: #f6f8fb;
}

body.v2 .user_account_box .user_account_list {
    margin-bottom: 0;
}

body.v2 .user_account_box_title {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 700;
    color: #1a2740;
}

/* ... the account is known to have a purchase in a store */
body.v2 .user_account_box_live {
    border-color: #f0dcc0;
    border-left: 4px solid #d08a2c;
    background: #fdf6ec;
}

body.v2 .user_account p.user_account_alert {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fdecec;
    font-weight: 700;
    color: #b3312e;
}

body.v2 .user_actions .btn_submit.btn_danger {
    background: #b3312e;
}

body.v2 .user_actions .btn_submit.btn_danger:hover {
    background: #962622;
}
