/* =========================================================
   ROVEN — AUTOMATIC OTC COPY TRADE
   File: public_html/trade.css
   ========================================================= */


/* =========================================================
   DESIGN TOKENS
   ========================================================= */

:root {
    --roven-gold: #F0B90B;
    --roven-gold-hover: #DFAE00;
    --roven-gold-soft: #FFF8DD;

    --roven-white: #FFFFFF;
    --roven-bg: #F7F8FA;
    --roven-surface: #FFFFFF;

    --roven-text: #181A20;
    --roven-secondary: #667085;
    --roven-muted: #98A2B3;

    --roven-border: #E4E7EC;
    --roven-border-light: #F0F1F3;

    --roven-success: #0ECB81;
    --roven-success-dark: #067647;
    --roven-success-soft: #ECFDF3;
    --roven-success-border: #A6F4C5;

    --roven-danger: #F6465D;
    --roven-danger-dark: #B42318;
    --roven-danger-soft: #FFF1F3;

    --roven-warning-dark: #B54708;
    --roven-warning-soft: #FFFAEB;
    --roven-warning-border: #FEDF89;

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 999px;

    --shadow-xs:
        0 1px 2px rgba(16, 24, 40, 0.03);

    --shadow-sm:
        0 4px 16px rgba(16, 24, 40, 0.05);

    --shadow-md:
        0 14px 40px rgba(16, 24, 40, 0.12);

    --bottom-nav-height: 72px;

    --transition: 160ms ease;
}


/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--roven-bg);

    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;

    margin: 0;

    padding-bottom:
        calc(
            var(--bottom-nav-height)
            + 20px
            + env(safe-area-inset-bottom)
        );

    overflow-x: hidden;

    background: var(--roven-bg);

    color: var(--roven-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    font-size: 14px;
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.is-trade-sheet-open {
    overflow: hidden;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(240, 185, 11, 0.28);
    color: var(--roven-text);
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.skip-link {
    position: fixed;

    top: -100px;
    left: 12px;

    z-index: 9999;

    padding: 10px 14px;

    border-radius: var(--radius-sm);

    background: var(--roven-text);

    color: var(--roven-white);

    font-size: 12px;
    font-weight: 700;
}

.skip-link:focus {
    top:
        calc(
            10px
            + env(safe-area-inset-top)
        );
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline:
        2px solid
        var(--roven-gold);

    outline-offset: 2px;
}


/* =========================================================
   HEADER
   ========================================================= */

.trade-header {
    position: sticky;

    top: 0;

    z-index: 900;

    padding-top:
        env(safe-area-inset-top);

    border-bottom:
        1px solid
        var(--roven-border-light);

    background:
        rgba(255, 255, 255, 0.97);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.trade-header__inner {
    width: min(100%, 900px);

    min-height: 64px;

    margin-inline: auto;

    padding-inline: 14px;

    display: grid;

    grid-template-columns:
        42px
        minmax(0, 1fr)
        42px;

    align-items: center;

    gap: 10px;
}

.trade-header__back,
.trade-history-link {
    width: 42px;
    height: 42px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--roven-border);

    border-radius: 50%;

    background: var(--roven-white);

    color: var(--roven-text);

    transition:
        background-color var(--transition),
        transform var(--transition);
}

.trade-header__back svg,
.trade-history-link svg {
    width: 21px;
    height: 21px;
}


/* =========================================================
   BRAND
   ========================================================= */

.trade-brand {
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.trade-brand__logo {
    width: auto;
    height: 31px;

    max-width: 138px;

    object-fit: contain;
}


/* =========================================================
   MAIN
   ========================================================= */

.trade-main {
    width: min(100%, 900px);

    margin-inline: auto;

    padding:
        14px
        14px
        28px;
}


/* =========================================================
   TOP TABS
   ========================================================= */

.trade-tabs {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 6px;

    padding: 4px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-white);

    box-shadow: var(--shadow-xs);
}

.trade-tab {
    min-height: 39px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border-radius: 7px;

    background: transparent;

    color: var(--roven-secondary);

    font-size: 11px;
    font-weight: 650;

    transition:
        background-color var(--transition),
        color var(--transition);
}

.trade-tab.is-active {
    background: var(--roven-gold);

    color: var(--roven-text);

    font-weight: 750;
}


/* =========================================================
   INTRO
   ========================================================= */

.trade-page-intro {
    padding: 22px 3px 17px;
}

.trade-page-intro__eyebrow {
    display: block;

    color: #946A00;

    font-size: 9px;
    font-weight: 750;

    letter-spacing: 0.11em;

    text-transform: uppercase;
}

.trade-page-intro h1 {
    margin: 5px 0 6px;

    color: var(--roven-text);

    font-size: clamp(27px, 7vw, 38px);

    font-weight: 760;

    line-height: 1.12;

    letter-spacing: -0.03em;
}

.trade-page-intro p {
    max-width: 610px;

    margin: 0;

    color: var(--roven-secondary);

    font-size: 12px;

    line-height: 1.65;
}


/* =========================================================
   PANELS
   ========================================================= */

.trade-workspace__panel {
    margin-top: 12px;

    padding: 15px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-lg);

    background: var(--roven-white);

    box-shadow: var(--shadow-xs);
}

.trade-section-heading {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.trade-section-heading > div {
    min-width: 0;
}

.trade-section-heading h2 {
    margin: 0;

    color: var(--roven-text);

    font-size: 16px;
    font-weight: 750;

    letter-spacing: -0.015em;
}

.trade-section-heading p {
    margin: 3px 0 0;

    color: var(--roven-secondary);

    font-size: 9px;

    line-height: 1.5;
}


/* =========================================================
   SCHEDULE / TIMING GRID
   ========================================================= */

.trade-timing-grid {
    margin-top: 12px;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 8px;
}

.trade-timing-item {
    min-width: 0;

    padding: 11px;

    border:
        1px solid
        var(--roven-border-light);

    border-radius: var(--radius-md);

    background: var(--roven-bg);
}

.trade-timing-item span,
.trade-timing-item strong {
    display: block;
}

.trade-timing-item span {
    color: var(--roven-secondary);

    font-size: 8px;
    font-weight: 600;
}

.trade-timing-item strong {
    margin-top: 4px;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 12px;
    font-weight: 750;
}


/* =========================================================
   CURRENT TRADE LOADING
   ========================================================= */

.trade-page-loading {
    min-height: 150px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 9px;

    color: var(--roven-secondary);

    font-size: 10px;
    font-weight: 600;
}

.trade-page-loading__spinner {
    width: 25px;
    height: 25px;

    border:
        2px solid
        var(--roven-border);

    border-top-color:
        var(--roven-gold);

    border-radius: 50%;

    animation:
        trade-spin
        700ms linear infinite;
}

@keyframes trade-spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   CURRENT ERROR
   ========================================================= */

.trade-history-error-state {
    margin-top: 12px;

    padding: 13px;

    border:
        1px solid
        #FECDCA;

    border-radius: var(--radius-md);

    background: var(--roven-danger-soft);

    color: var(--roven-danger-dark);

    font-size: 10px;

    line-height: 1.55;
}

.trade-history-error-state strong {
    display: block;

    font-size: 11px;
    font-weight: 750;
}


/* =========================================================
   EMPTY CURRENT TRADE
   ========================================================= */

.trade-empty-state {
    min-height: 190px;

    margin-top: 12px;

    padding: 26px 15px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border:
        1px dashed
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-bg);

    text-align: center;
}

.trade-empty-state__icon {
    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--roven-border);

    border-radius: 50%;

    background: var(--roven-white);

    color: var(--roven-secondary);
}

.trade-empty-state__icon svg {
    width: 23px;
    height: 23px;
}

.trade-empty-state h3 {
    margin: 10px 0 0;

    color: var(--roven-text);

    font-size: 13px;
    font-weight: 750;
}

.trade-empty-state p {
    max-width: 400px;

    margin: 5px 0 0;

    color: var(--roven-secondary);

    font-size: 10px;

    line-height: 1.55;
}


/* =========================================================
   CURRENT TRADE CARD
   ========================================================= */

.current-trade-card {
    margin-top: 12px;
}

.copy-trade-card {
    padding: 14px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-lg);

    background: var(--roven-white);
}

.copy-trade-card__top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}

.copy-trade-card__identity {
    min-width: 0;
}

.trade-label {
    display: block;

    color: #946A00;

    font-size: 8px;
    font-weight: 750;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}

.trade-pair {
    display: block;

    margin-top: 3px;

    color: var(--roven-text);

    font-size: 18px;
    font-weight: 780;

    line-height: 1.2;

    letter-spacing: -0.02em;
}

.trade-contract {
    display: inline-flex;

    align-items: center;

    min-height: 21px;

    margin-top: 5px;

    padding: 2px 7px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-pill);

    background: var(--roven-bg);

    color: var(--roven-secondary);

    font-size: 7px;
    font-weight: 750;

    letter-spacing: 0.05em;
}


/* =========================================================
   STATUS BADGE
   ========================================================= */

.trade-status {
    flex: 0 0 auto;

    min-height: 26px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 4px 9px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-pill);

    background: var(--roven-bg);

    color: var(--roven-secondary);

    font-size: 8px;
    font-weight: 750;

    white-space: nowrap;
}

.trade-status.is-open {
    border-color:
        var(--roven-warning-border);

    background:
        var(--roven-warning-soft);

    color:
        var(--roven-warning-dark);
}

.trade-status.is-active {
    border-color:
        var(--roven-success-border);

    background:
        var(--roven-success-soft);

    color:
        var(--roven-success-dark);
}

.trade-status.is-completed {
    border-color:
        var(--roven-success-border);

    background:
        var(--roven-success-soft);

    color:
        var(--roven-success-dark);
}

.trade-status.is-closed {
    background: var(--roven-bg);
    color: var(--roven-secondary);
}


/* =========================================================
   MESSAGE
   ========================================================= */

.copy-trade-message {
    margin: 12px 0 0;

    padding: 10px 11px;

    border-left:
        3px solid
        var(--roven-gold);

    border-radius:
        0
        var(--radius-sm)
        var(--radius-sm)
        0;

    background:
        var(--roven-gold-soft);

    color:
        #6F5200;

    font-size: 9px;

    line-height: 1.6;
}


/* =========================================================
   COPY STATUS
   ========================================================= */

.trade-copy-status-section {
    margin-top: 12px;

    padding: 11px;

    border:
        1px solid
        var(--roven-success-border);

    border-radius: var(--radius-md);

    background:
        var(--roven-success-soft);
}

#tradeCopyStatusText {
    display: block;

    color:
        var(--roven-success-dark);

    font-size: 12px;
    font-weight: 750;
}


/* =========================================================
   DETAIL GRID
   ========================================================= */

.trade-detail-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}

.trade-detail-item {
    min-width: 0;

    padding: 9px;

    border:
        1px solid
        rgba(6, 118, 71, 0.10);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.70);
}

.trade-detail-item span,
.trade-detail-item strong {
    display: block;
}

.trade-detail-item span {
    color: var(--roven-secondary);

    font-size: 7px;
}

.trade-detail-item strong {
    margin-top: 3px;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 9px;
    font-weight: 700;
}


/* =========================================================
   ACTIVE TRADE
   ========================================================= */

.trade-active-section {
    margin-top: 12px;

    padding: 11px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-bg);
}

.trade-active-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}

.trade-active-item {
    min-width: 0;

    padding: 9px;

    border:
        1px solid
        var(--roven-border-light);

    border-radius: var(--radius-sm);

    background: var(--roven-white);
}

.trade-active-item span,
.trade-active-item strong {
    display: block;
}

.trade-active-item span {
    color: var(--roven-secondary);

    font-size: 7px;
}

.trade-active-item strong {
    margin-top: 3px;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 10px;
    font-weight: 750;
}


/* =========================================================
   COMPLETED SECTION
   ========================================================= */

.trade-completed-section {
    margin-top: 12px;

    padding: 11px;

    border:
        1px solid
        var(--roven-success-border);

    border-radius: var(--radius-md);

    background:
        var(--roven-success-soft);
}

.trade-result-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}

.trade-result-item {
    min-width: 0;

    padding: 9px;

    border:
        1px solid
        rgba(6, 118, 71, 0.10);

    border-radius: var(--radius-sm);

    background:
        rgba(255, 255, 255, 0.76);
}

.trade-result-item span,
.trade-result-item strong {
    display: block;
}

.trade-result-item span {
    color: var(--roven-secondary);

    font-size: 7px;
}

.trade-result-item strong {
    margin-top: 3px;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 10px;
    font-weight: 750;
}


/* =========================================================
   COPY NOTICE
   ========================================================= */

.copy-trade-notice {
    margin-top: 12px;

    padding: 10px 11px;

    border:
        1px solid
        var(--roven-border-light);

    border-radius: var(--radius-sm);

    background: var(--roven-bg);

    color: var(--roven-secondary);

    font-size: 9px;

    line-height: 1.55;
}


/* =========================================================
   COPY BUTTON
   ========================================================= */

.copy-trade-button {
    width: 100%;

    min-height: 44px;

    margin-top: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 9px 14px;

    border-radius: var(--radius-md);

    background: var(--roven-gold);

    color: var(--roven-text);

    font-size: 11px;
    font-weight: 750;

    transition:
        background-color var(--transition),
        transform var(--transition),
        opacity var(--transition);
}

.copy-trade-button:disabled {
    opacity: 0.55;
}

.button__loader {
    width: 15px;
    height: 15px;

    border:
        2px solid
        rgba(24, 26, 32, 0.24);

    border-top-color:
        var(--roven-text);

    border-radius: 50%;

    animation:
        trade-spin
        700ms linear infinite;
}


/* =========================================================
   VALUE COLORS
   ========================================================= */

.is-positive {
    color:
        var(--roven-success-dark)
        !important;
}

.is-negative {
    color:
        var(--roven-danger)
        !important;
}

.is-neutral {
    color:
        var(--roven-secondary)
        !important;
}


/* =========================================================
   RECENT TRADES
   ========================================================= */

.trade-history-list {
    margin-top: 12px;

    display: grid;

    gap: 8px;
}

.trade-history-card {
    padding: 12px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-white);
}

.trade-history-card__top {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 10px;
}

.trade-history-card__identity {
    min-width: 0;
}

.trade-history-card__identity strong,
.trade-history-card__identity span {
    display: block;
}

.trade-history-card__identity strong {
    overflow: hidden;

    color: var(--roven-text);

    font-size: 11px;
    font-weight: 750;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.trade-history-card__identity span {
    margin-top: 2px;

    color: var(--roven-muted);

    font-size: 7px;
}

.trade-history-result {
    flex: 0 0 auto;

    min-height: 23px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 3px 8px;

    border-radius: var(--radius-pill);

    font-size: 8px;
    font-weight: 800;
}

.trade-history-result.is-win {
    border:
        1px solid
        var(--roven-success-border);

    background:
        var(--roven-success-soft);

    color:
        var(--roven-success-dark);
}

.trade-history-card__grid {
    margin-top: 10px;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 7px;
}

.trade-history-card__item {
    min-width: 0;

    padding: 8px;

    border:
        1px solid
        var(--roven-border-light);

    border-radius: var(--radius-sm);

    background: var(--roven-bg);
}

.trade-history-card__item span,
.trade-history-card__item strong {
    display: block;
}

.trade-history-card__item span {
    color: var(--roven-secondary);

    font-size: 7px;
}

.trade-history-card__item strong {
    margin-top: 3px;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 9px;
    font-weight: 700;
}


/* =========================================================
   HISTORY EMPTY
   ========================================================= */

.trade-history-empty-state {
    min-height: 165px;

    margin-top: 12px;

    padding: 24px 15px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    border:
        1px dashed
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-bg);

    text-align: center;
}

.trade-history-empty-state__icon {
    width: 42px;
    height: 42px;

    display: flex;

    align-items: center;
    justify-content: center;

    border:
        1px solid
        var(--roven-border);

    border-radius: 50%;

    background: var(--roven-white);

    color: var(--roven-secondary);
}

.trade-history-empty-state__icon svg {
    width: 21px;
    height: 21px;
}

.trade-history-empty-state h3 {
    margin: 9px 0 0;

    color: var(--roven-text);

    font-size: 12px;
    font-weight: 750;
}

.trade-history-empty-state p {
    margin: 4px 0 0;

    color: var(--roven-secondary);

    font-size: 9px;
}


/* =========================================================
   COPY SHEET BACKDROP
   ========================================================= */

.copy-trade-sheet-backdrop {
    position: fixed;

    inset: 0;

    z-index: 2000;

    background:
        rgba(16, 24, 40, 0.45);

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}


/* =========================================================
   COPY SHEET
   ========================================================= */

.copy-trade-sheet {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2001;

    width: 100%;

    max-width: 560px;

    margin-inline: auto;

    overflow-y: auto;

    max-height:
        calc(100vh - 28px);

    padding-bottom:
        env(safe-area-inset-bottom);

    border:
        1px solid
        var(--roven-border);

    border-bottom: 0;

    border-radius:
        20px
        20px
        0
        0;

    background: var(--roven-white);

    box-shadow: var(--shadow-md);
}

.copy-trade-sheet__header {
    position: sticky;

    top: 0;

    z-index: 2;

    min-height: 60px;

    padding: 12px 14px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    border-bottom:
        1px solid
        var(--roven-border-light);

    background:
        rgba(255, 255, 255, 0.97);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.copy-trade-sheet__header h2 {
    margin: 0;

    color: var(--roven-text);

    font-size: 15px;
    font-weight: 750;
}

.copy-trade-sheet-close {
    width: 37px;
    height: 37px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--roven-bg);

    color: var(--roven-text);

    font-size: 23px;

    line-height: 1;
}

.copy-trade-sheet__body {
    padding: 14px;
}


/* =========================================================
   COPY SUMMARY
   ========================================================= */

.copy-trade-summary {
    overflow: hidden;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-bg);
}

.copy-trade-summary__row {
    min-height: 44px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 9px 11px;

    border-bottom:
        1px solid
        var(--roven-border-light);
}

.copy-trade-summary__row:last-child {
    border-bottom: 0;
}

.copy-trade-summary__row span {
    color: var(--roven-secondary);

    font-size: 9px;
}

.copy-trade-summary__row strong {
    max-width: 62%;

    overflow-wrap: anywhere;

    color: var(--roven-text);

    font-size: 10px;
    font-weight: 750;

    text-align: right;
}


/* =========================================================
   COPY AMOUNT FIELD
   ========================================================= */

.copy-trade-field {
    margin-top: 14px;
}

.copy-trade-field > label {
    display: block;

    margin-bottom: 6px;

    color: var(--roven-text);

    font-size: 9px;
    font-weight: 700;
}

.copy-trade-input-shell {
    min-height: 48px;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 8px;

    padding: 0 12px;

    border:
        1px solid
        var(--roven-border);

    border-radius: var(--radius-md);

    background: var(--roven-white);

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.copy-trade-input-shell:focus-within {
    border-color: var(--roven-gold);

    box-shadow:
        0 0 0 3px
        rgba(240, 185, 11, 0.11);
}

.copy-trade-input-shell input {
    width: 100%;

    min-width: 0;

    height: 46px;

    padding: 0;

    border: 0;

    outline: 0;

    background: transparent;

    color: var(--roven-text);

    font-size: 15px;
    font-weight: 650;
}

.copy-trade-input-shell input::placeholder {
    color: var(--roven-muted);

    font-weight: 500;
}

.copy-trade-input-unit {
    color: var(--roven-secondary);

    font-size: 10px;
    font-weight: 750;
}

.form-error {
    display: block;

    min-height: 17px;

    margin-top: 5px;

    color: var(--roven-danger-dark);

    font-size: 8px;

    line-height: 1.45;
}

#copyTradeSheetCountdown {
    margin-top: 8px;

    padding: 9px 10px;

    border:
        1px solid
        var(--roven-warning-border);

    border-radius: var(--radius-sm);

    background:
        var(--roven-warning-soft);

    color:
        var(--roven-warning-dark);

    font-size: 9px;
    font-weight: 700;

    text-align: center;
}


/* =========================================================
   COPY SHEET ACTIONS
   ========================================================= */

.copy-trade-sheet__actions {
    margin-top: 14px;

    display: grid;

    grid-template-columns:
        1fr
        1.25fr;

    gap: 8px;
}

#cancelCopyTradeButton,
#confirmCopyTradeButton {
    min-height: 44px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 9px 12px;

    border-radius: var(--radius-md);

    font-size: 10px;
    font-weight: 750;
}

#cancelCopyTradeButton {
    border:
        1px solid
        var(--roven-border);

    background: var(--roven-white);

    color: var(--roven-secondary);
}

#confirmCopyTradeButton {
    background: var(--roven-gold);

    color: var(--roven-text);
}

#confirmCopyTradeButton:disabled {
    opacity: 0.58;
}


/* =========================================================
   BOTTOM NAV
   ========================================================= */

.roven-bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    z-index: 1000;

    min-height:
        calc(
            var(--bottom-nav-height)
            + env(safe-area-inset-bottom)
        );

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    padding:
        6px
        5px
        calc(
            6px
            + env(safe-area-inset-bottom)
        );

    border-top:
        1px solid
        var(--roven-border);

    background:
        rgba(255, 255, 255, 0.97);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.roven-bottom-nav__item {
    min-width: 0;

    min-height: 52px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;

    border-radius: 8px;

    color: var(--roven-secondary);
}

.roven-bottom-nav__icon {
    display: block;
}

.roven-bottom-nav__icon svg {
    width: 21px;
    height: 21px;
}

.roven-bottom-nav__label {
    max-width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 8px;
    font-weight: 600;
}

.roven-bottom-nav__item.is-active {
    color: var(--roven-text);
}

.roven-bottom-nav__item.is-active
.roven-bottom-nav__icon {
    color: var(--roven-gold);
}


/* =========================================================
   HOVER DEVICES
   ========================================================= */

@media (hover: hover) and (pointer: fine) {

    .trade-header__back:hover,
    .trade-history-link:hover {
        background: var(--roven-bg);
    }

    .trade-tab:hover:not(.is-active) {
        background: var(--roven-bg);
        color: var(--roven-text);
    }

    .copy-trade-button:hover:not(:disabled),
    #confirmCopyTradeButton:hover:not(:disabled) {
        background: var(--roven-gold-hover);
    }

    #cancelCopyTradeButton:hover {
        background: var(--roven-bg);
    }

    .roven-bottom-nav__item:hover {
        color: var(--roven-text);
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 640px) {

    .trade-header__inner {
        padding-inline: 20px;
    }

    .trade-main {
        padding:
            20px
            20px
            34px;
    }

    .trade-page-intro {
        padding:
            26px
            4px
            20px;
    }

    .trade-workspace__panel {
        padding: 18px;
    }

    .trade-timing-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .trade-active-grid,
    .trade-result-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .trade-history-card__grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

    .trade-detail-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .copy-trade-sheet__body {
        padding: 18px;
    }
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 900px) {

    .trade-workspace__panel {
        box-shadow: var(--shadow-sm);
    }

    .copy-trade-card {
        padding: 17px;
    }

    .trade-section-heading h2 {
        font-size: 17px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 374px) {

    .trade-header__inner {
        grid-template-columns:
            38px
            minmax(0, 1fr)
            38px;

        gap: 7px;

        padding-inline: 10px;
    }

    .trade-header__back,
    .trade-history-link {
        width: 38px;
        height: 38px;
    }

    .trade-brand__logo {
        height: 27px;
        max-width: 122px;
    }

    .trade-main {
        padding-inline: 10px;
    }

    .trade-workspace__panel {
        padding: 12px;
    }

    .copy-trade-card {
        padding: 11px;
    }

    .trade-pair {
        font-size: 16px;
    }

    .trade-timing-grid,
    .trade-detail-grid,
    .trade-active-grid,
    .trade-result-grid,
    .trade-history-card__grid {
        gap: 6px;
    }

    .trade-timing-item,
    .trade-active-item,
    .trade-result-item,
    .trade-history-card__item {
        padding: 8px;
    }

    .copy-trade-sheet__body {
        padding: 12px;
    }

    .roven-bottom-nav__label {
        font-size: 7px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            0.01ms !important;
    }
}