/* ============================================================
   ProVQ ROI Calculator — Frontend Styles (Dark Theme)
   ============================================================ */

#roic-wrap {
    --roic-navy:              #0d1b2a;
    --roic-blue:              #a3bffa;
    --roic-blue-soft:         rgba(163, 191, 250, 0.25);
    --roic-yellow:            #daff00;
    --roic-yellow-hover:      #c8eb00;
    --roic-yellow-arrow-bg:   #b8d800;
    --roic-card:              #ecf0f5;
    --roic-card-divider:      rgba(13, 27, 42, 0.07);
    --roic-text:              #0d1b2a;
    --roic-muted:             #6b7280;
    --roic-input-placeholder: #b0b6c0;
    --roic-white:             #ffffff;
    --roic-success:           #4cd9ad;
    --roic-error:             #f88a99;

    --roic-radius-lg:   18px;
    --roic-radius-md:   12px;
    --roic-radius-pill: 999px;

    box-sizing: border-box;
    max-width: 720px;
    margin: 24px auto;
    padding: 32px;
    background: var(--roic-navy);
    border-radius: var(--roic-radius-lg);
    color: var(--roic-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

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

/* ── Tabs (pill switcher) ─────────────────────────────────── */
.roic-tabs {
    display: inline-flex;
    background: var(--roic-blue);
    border-radius: var(--roic-radius-pill);
    padding: 4px;
    margin-bottom: 28px;
}

.roic-tab-btn {
    background: transparent;
    color: var(--roic-text);
    border: none;
    padding: 7px 26px;
    border-radius: var(--roic-radius-pill);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.2px;
    transition: background 0.18s ease;
}

.roic-tab-btn.active {
    background: var(--roic-white);
}

.roic-tab-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.25);
}

.roic-tab-btn:focus-visible {
    outline: 2px solid var(--roic-white);
    outline-offset: 2px;
}

/* ── Header ───────────────────────────────────────────────── */
.roic-header {
    background: transparent;
    color: var(--roic-white);
    text-align: left;
    padding: 0;
    margin-bottom: 28px;
}

.roic-header h2 {
    margin: 0 0 8px;
    color: var(--roic-white);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.roic-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* ── Panels ───────────────────────────────────────────────── */
.roic-panel {
    display: none;
}

.roic-panel.active {
    display: block;
    animation: roicFadeIn 0.22s ease;
}

@keyframes roicFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.roic-body {
    padding: 0;
}

/* ── Form Fields ─────────────────────────────────────────── */
.roic-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.roic-travel-wrap {
    margin-bottom: 18px;
}

.roic-field {
    display: flex;
    flex-direction: column;
}

.roic-field > label {
    display: block;
    color: var(--roic-white);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.roic-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-weight: 400;
    margin-left: 4px;
}

.roic-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--roic-white);
    color: var(--roic-text);
    border: 1px solid transparent;
    border-radius: var(--roic-radius-md);
    font-size: 14px;
    font-family: inherit;
    -moz-appearance: textfield;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.roic-input::-webkit-outer-spin-button,
.roic-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.roic-input::placeholder {
    color: var(--roic-input-placeholder);
}

.roic-input:focus {
    outline: none;
    border-color: var(--roic-blue);
    box-shadow: 0 0 0 3px var(--roic-blue-soft);
}

.roic-input[readonly] {
    background: var(--roic-white);
    color: var(--roic-text);
    cursor: default;
}

/* ── Results Card ─────────────────────────────────────────── */
.roic-results {
    background: var(--roic-card);
    border-radius: var(--roic-radius-md);
    padding: 4px 22px;
    margin-bottom: 18px;
    color: var(--roic-text);
}

.roic-result-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--roic-card-divider);
    font-size: 13.5px;
}

.roic-result-row:last-child {
    border-bottom: none;
}

.rlabel {
    flex: 1;
    color: var(--roic-text);
    font-weight: 500;
    line-height: 1.4;
}

.rsub {
    display: inline;
    color: var(--roic-muted);
    font-size: 12px;
    font-weight: 400;
    margin-left: 6px;
}

.rvalue {
    color: var(--roic-text);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rvalue.profit,
.rvalue.loss {
    color: var(--roic-text);
}

/* ── Email Section ───────────────────────────────────────── */
.roic-email-section {
    margin-top: 24px;
    padding-top: 4px;
    border-top: none;
}

.roic-email-section > label {
    display: block;
    color: var(--roic-white);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
}

.roic-req {
    color: var(--roic-blue);
    font-weight: 500;
    margin-left: 4px;
}

.roic-email-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.roic-email-row .roic-input {
    width: 100%;
}

/* ── Send Button (yellow pill with arrow circle) ─────────── */
.roic-send-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 24px;
    background: var(--roic-yellow);
    color: var(--roic-text);
    border: none;
    border-radius: var(--roic-radius-pill);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.roic-send-btn:hover:not(:disabled) {
    background: var(--roic-yellow-hover);
}

.roic-send-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.roic-send-btn:disabled {
    background: #9bb000;
    cursor: not-allowed;
    opacity: 0.7;
}

.roic-send-btn svg {
    width: 16px;
    height: 16px;
    padding: 8px;
    background: var(--roic-yellow-arrow-bg);
    border-radius: 50%;
    box-sizing: content-box;
    color: var(--roic-text);
}

.roic-send-btn.is-loading svg {
    animation: roicSpin 0.8s linear infinite;
}

@keyframes roicSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── Messages ─────────────────────────────────────────────── */
.roic-msg {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--roic-white);
    min-height: 0;
}

.roic-msg.show {
    padding: 10px 14px;
    border-radius: var(--roic-radius-md);
}

.roic-msg.success {
    background: rgba(0, 196, 140, 0.18);
    color: var(--roic-success);
    border: 1px solid rgba(0, 196, 140, 0.35);
}

.roic-msg.error {
    background: rgba(232, 68, 90, 0.15);
    color: var(--roic-error);
    border: 1px solid rgba(232, 68, 90, 0.35);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    #roic-wrap {
        margin: 12px;
        padding: 22px;
        border-radius: 14px;
    }

    .roic-header h2 {
        font-size: 24px;
    }

    .roic-row-2 {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .roic-tabs {
        margin-bottom: 22px;
    }

    .roic-tab-btn {
        padding: 7px 22px;
        font-size: 13px;
    }

    .roic-results {
        padding: 4px 18px;
    }
}
