/**
 * MT4 Performance styles.
 *
 * Base table / pagination styles adapted from the original main.css and
 * datatables.css of the Intomillion statement system, plus plugin-specific
 * overview / chart / trade styles.
 */

/* ---------------------------------------------------------------------- */
/*  Colour helpers                                                        */
/* ---------------------------------------------------------------------- */
.mt4-positive { color: #008000; }
.mt4-negative { color: #b50203; }
.mt4-buy { color: #008000; }
.mt4-sell { color: #b50203; }
.mt4-highlight { color: #d9230f; }
.mt4-error {
    color: #b50203;
    padding: 8px 12px;
    border: 1px solid #f0c0c0;
    background: #fff5f5;
    border-radius: 3px;
    font-family: Roboto, sans-serif;
    font-size: 13px;
}

/* ---------------------------------------------------------------------- */
/*  Overview table (image.png two-column layout)                          */
/* ---------------------------------------------------------------------- */
.mt4-overview {
    display: block;
    width: 100%;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    overflow: hidden;
}
.mt4-overview-col {
    float: left;
    width: 50%;
    box-sizing: border-box;
    padding: 0 15px;
}
.mt4-overview-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
.mt4-overview-table td {
    padding: 4px 8px;
    line-height: 1.35;
    vertical-align: top;
    border: 0;
    background: transparent !important;
}
.mt4-overview-table td.mt4-label {
    font-weight: 700;
    color: #555;
    width: 48%;
    white-space: nowrap;
}
.mt4-overview-table td.mt4-value {
    color: #777;
}
/* Keep the overview clean like the legacy Summary Details block. */
.mt4-overview-table tr:nth-of-type(odd) td,
.mt4-overview-table tr:nth-of-type(even) td,
.mt4-overview-table tr:hover td {
    background: transparent !important;
}

@media screen and (max-width: 767px) {
    .mt4-overview-col {
        float: none;
        width: 100%;
        padding: 0;
    }
}

/* ---------------------------------------------------------------------- */
/*  Chart                                                                  */
/* ---------------------------------------------------------------------- */
.mt4-chart-wrap {
    width: 100%;
    margin: 15px 0;
}
.mt4-performance-chart {
    width: 100%;
    min-height: 300px;
    height: 340px;
}

/* ---------------------------------------------------------------------- */
/*  Trades table (base table styles from main.css)                        */
/* ---------------------------------------------------------------------- */
.mt4-trades-table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    background-color: #fff;
    font-family: Roboto, sans-serif;
    font-size: 13px;
    border-collapse: collapse;
    border-bottom: 0 !important;
}
.mt4-trades-table > thead > tr > th,
.mt4-trades-table > tbody > tr > td {
    padding: 8px;
    line-height: 1.538462;
    vertical-align: top;
    border-top: 1px solid #ddd;
    text-align: left;
}
.mt4-trades-table > thead > tr > th {
    vertical-align: bottom;
    border-bottom: 2px solid #ddd;
    text-align: left;
}
.mt4-trades-table.table-striped > tbody > tr:nth-of-type(odd),
.mt4-trades-table > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}
.mt4-trades-table.table-hover > tbody > tr:hover,
.mt4-trades-table > tbody > tr:hover {
    background-color: #f5f5f5;
}
.table-nowrap > tbody > tr > td,
.table-nowrap > thead > tr > th {
    white-space: nowrap;
}

/* DataTables adds a dark no-footer line by default. The legacy table has none. */
.mt4-trades-table.dataTable.no-footer {
    border-bottom: 0 !important;
}

/* Active/sorted column: red text + red underline, matching the legacy page. */
.mt4-trades-table.dataTable thead th.sorting_asc,
.mt4-trades-table.dataTable thead th.sorting_desc {
    position: relative;
    color: #cc0000 !important;
    border-bottom: 3px solid #cc0000 !important;
    background-image: none !important;
    padding-right: 24px;
}
.mt4-trades-table.dataTable thead th.sorting {
    background-position: center right 6px;
}
.mt4-trades-table.dataTable thead th.sorting_asc:after,
.mt4-trades-table.dataTable thead th.sorting_desc:after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    width: 0;
    height: 0;
    margin-top: -3px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}
.mt4-trades-table.dataTable thead th.sorting_asc:after {
    border-bottom: 6px solid #cc0000;
}
.mt4-trades-table.dataTable thead th.sorting_desc:after {
    border-top: 6px solid #cc0000;
}

/* DataTables pagination — legacy Intomillion style.
 * Keep Previous / page numbers / Next on one line. The disabled arrows stay
 * visible but are not clickable, exactly like the old table pagination. */
.dataTables_wrapper .dataTables_paginate {
    float: right;
    display: inline-flex !important;
    align-items: stretch;
    white-space: nowrap;
    margin-top: 10px;
    padding-top: 0;
}
.dataTables_wrapper .dataTables_paginate > span {
    display: inline-flex !important;
    align-items: stretch;
    white-space: nowrap;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    position: relative;
    float: none !important;
    display: inline-block !important;
    box-sizing: border-box;
    min-width: 0 !important;
    height: auto !important;
    padding: 6px 12px !important;
    margin: 0 0 0 -1px !important;
    line-height: 1.538462 !important;
    text-decoration: none !important;
    text-align: center;
    font-size: 13px !important;
    font-weight: 400;
    color: #777 !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 0 !important;
    cursor: pointer;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #fff !important;
    background: #cc0000 !important;
    border-color: #cc0000 !important;
    cursor: default;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    color: #555 !important;
    background: #f5f5f5 !important;
    border-color: #ddd !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    font-size: 12px !important;
    font-family: Arial, Helvetica, sans-serif;
    color: #aaa !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    color: #d3d3d3 !important;
    background: #fff !important;
    border-color: #ddd !important;
    cursor: default !important;
    pointer-events: none;
    box-shadow: none !important;
}
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 3px;
}
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #ddd;
    padding: 3px;
}
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    color: #777;
    font-size: 13px;
    margin-bottom: 8px;
}

/* ---------------------------------------------------------------------- */
/*  Inline value shortcodes                                               */
/* ---------------------------------------------------------------------- */
.mt4-equity,
.mt4-step,
.mt4-time {
    font-family: Roboto, sans-serif;
    font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/*  Admin                                                                  */
/* ---------------------------------------------------------------------- */
.mt4-admin-wrap .mt4-update-status {
    display: inline-block;
    margin-left: 6px;
    font-weight: 700;
}
.mt4-admin-wrap .mt4-shortcode-help code {
    background: #f3f3f3;
    padding: 2px 5px;
}
.mt4-admin-wrap .button-link-delete {
    color: #b50203;
}

.mt4-last-updated {
    margin: 0 0 12px 0;
    color: #777;
    font-size: 14px;
}

/* ---------------------------------------------------------------------- */
/*  Live / open-trades summary                                            */
/* ---------------------------------------------------------------------- */
.mt4-open-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.mt4-live-updated {
    margin: 0 0 12px 0;
    color: #777;
    font-size: 14px;
}
.mt4-live-summary-wrap {
    float: right;
    width: 25%;
    min-width: 240px;
    margin-top: 0;
}
.mt4-live-summary {
    float: right;
    border-collapse: collapse;
    text-align: right;
    font-family: Roboto, sans-serif;
    font-size: 13px;
}
.mt4-live-summary td {
    border: 0;
    padding: 3px 8px;
    white-space: nowrap;
}
.mt4-live-summary td:last-child {
    min-width: 80px;
}
.mt4-live-summary-clear {
    clear: both;
}
@media screen and (max-width: 767px) {
    .mt4-live-summary-wrap {
        float: none;
        width: 100%;
        min-width: 0;
    }
    .mt4-live-summary {
        float: right;
    }
}

/* ---------------------------------------------------------------------- */
/*  1.0.8 - Live Home progress + Step-By-Step Plan                        */
/* ---------------------------------------------------------------------- */
.mt4-home-progress {
    background: #f2f2f2;
    border-top: 1px solid #e7e7e7;
    border-bottom: 1px solid #e7e7e7;
    padding-top: 20px;
}
.mt4-home-progress .mt4-home-stats,
.mt4-home-progress .mt4-home-recent-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
.mt4-home-progress .mt4-home-stats td,
.mt4-home-progress .mt4-home-recent-table td {
    border: 0;
    background: transparent !important;
    padding: 3px 0;
    vertical-align: top;
}
.mt4-home-progress .mt4-home-stats tr:hover td,
.mt4-home-progress .mt4-home-recent-table tr:hover td {
    background: transparent !important;
}
.mt4-home-progress .mt4-home-strong {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    font-size: 13px;
    text-transform: uppercase;
    color: #19232d;
    font-weight: 600;
}
.mt4-home-progress .mt4-home-equity {
    color: #b50203;
}
.mt4-home-progress .mt4-home-right {
    text-align: right;
}
.mt4-home-progress .mt4-home-button {
    min-width: 80px;
    text-align: center;
}
.mt4-home-progress .mt4-home-recent-title {
    padding: 10px 0;
    font-size: 13px;
    text-transform: uppercase;
    color: #19232d;
    font-weight: 600;
}
.mt4-home-progress .mt4-home-recent-table .mt4-home-close-time,
.mt4-home-progress .mt4-home-recent-table td:last-child {
    text-align: right;
}
.mt4-home-progress .mt4-home-recent-detail td {
    border-bottom: 1px dotted #d9d9d9;
    padding-bottom: 5px;
}
.mt4-home-progress .mt4-home-stats-link,
.mt4-home-progress .mt4-home-about-more {
    text-align: right;
    padding-top: 10px;
    padding-bottom: 20px;
}
.mt4-home-progress .mt4-home-about-item {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dotted #d9d9d9;
}
.mt4-home-progress .mt4-home-about-item img {
    max-width: 110px;
    height: auto;
}
.mt4-home-progress .mt4-home-about-kicker {
    color: #b50203;
    font-size: 12px;
    text-transform: uppercase;
}
.mt4-home-progress .mt4-home-tabs .tabs-list a {
    cursor: pointer;
}

/* The old About table, generated now directly from account settings/SQL. */
.mt4-progress-plan {
    width: 100%;
    text-align: right;
    border-collapse: collapse;
}
.mt4-progress-plan th {
    text-align: right;
}
.mt4-progress-plan td {
    color: #38393a;
    border-top: 1px solid #dddddd;
    padding: 4px 6px;
    background: transparent;
}
.mt4-progress-plan td.mt4-plan-active {
    color: #fff !important;
    background: #B50203 !important;
}
.mt4-progress-plan tr:hover td {
    color: #fff;
    background: #B50203;
}

@media screen and (max-width: 767px) {
    .mt4-home-progress .mt4-home-about-item {
        display: block;
    }
    .mt4-home-progress .mt4-home-about-item img {
        float: left;
        margin: 0 10px 8px 0;
    }
}

/* ---------------------------------------------------------------------- */
/*  1.0.9 - Legacy Home layout + tab conflict fix                         */
/* ---------------------------------------------------------------------- */
.mt4-home-progress .mt4-home-widget-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mt4-home-progress .mt4-home-tab-panel {
    width: 100%;
    box-sizing: border-box;
}
.mt4-home-progress .mt4-home-stats,
.mt4-home-progress .mt4-home-recent-table {
    table-layout: auto;
}
.mt4-home-progress .mt4-home-stats td,
.mt4-home-progress .mt4-home-recent-table td {
    overflow: visible;
}
.mt4-home-progress .mt4-home-stats td:after,
.mt4-home-progress .mt4-home-recent-table td:after {
    content: "";
    display: table;
    clear: both;
}
.mt4-home-progress .mt4-home-float-left {
    float: left;
}
.mt4-home-progress .mt4-home-float-right {
    float: right;
}
.mt4-home-progress .mt4-home-pad-strong {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}
.mt4-home-progress .mt4-home-label-strong {
    font-size: 13px;
    text-transform: uppercase;
    color: #19232d;
    font-weight: 600;
}
.mt4-home-progress .mt4-home-equity {
    font-size: 13px;
    text-transform: uppercase;
    color: #b50203 !important;
}
.mt4-home-progress .mt4-positive,
.mt4-home-progress .mt4-positive a {
    color: #008800 !important;
}
.mt4-home-progress .mt4-negative,
.mt4-home-progress .mt4-negative a {
    color: #b50203 !important;
}
.mt4-home-progress .mt4-home-trade-type {
    padding-left: 3px;
}
.mt4-home-progress .mt4-home-action {
    margin-bottom: 6px;
}
.mt4-home-progress .mt4-home-button {
    width: 80px;
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
}
.mt4-home-progress .mt4-home-stats-link {
    padding-top: 10px;
    padding-bottom: 20px;
    min-height: 30px;
}
.mt4-home-progress .mt4-home-about-more {
    padding-top: 10px;
    padding-bottom: 20px;
    min-height: 30px;
}
.mt4-home-progress .mt4-home-clear {
    clear: both;
    height: 0;
    overflow: hidden;
}
.mt4-home-progress .mt4-home-about-text {
    margin: 0 0 12px 0;
}
.mt4-home-progress .mt4-home-recent-detail td {
    border-bottom: 1px dotted #d9d9d9 !important;
    padding-bottom: 5px !important;
}

/* ---------------------------------------------------------------------- */
/*  1.0.10 - Inline values inherit the surrounding theme typography       */
/* ---------------------------------------------------------------------- */
.mt4-equity,
.mt4-step,
.mt4-time,
.mt4-live-value {
    font-family: inherit;
    font-weight: inherit;
    font-style: inherit;
    font-size: inherit;
    line-height: inherit;
}
