/*
 * CODSHIPX AI CRM R62-R1
 * CodshipX Integration visual polish
 *
 * Scope:
 *   .r7-codshipx only
 *
 * No global panel override.
 * No MutationObserver.
 * No DOM scanner.
 */

.r7-codshipx {
    --cx62-ink: #10223a;
    --cx62-muted: #71849d;
    --cx62-line: #e1e9ef;
    --cx62-lime: #8fda16;
    --cx62-lime-dark: #5f9f00;
    --cx62-soft: #f7fafc;
}


/*
 * Quick seller connection card.
 *
 * Main fix:
 * more safe left/right padding so text never enters
 * the rounded corner area.
 */
.r7-codshipx > .module-head + article.panel {
    border-radius: 18px;
    padding: 24px 28px 25px;
    min-width: 0;

    background:
        radial-gradient(
            circle at 96% 0%,
            rgba(145, 215, 31, .10),
            transparent 34%
        ),
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fbfdf9 100%
        );

    box-shadow:
        0 12px 32px rgba(25, 47, 73, .075);
}


/*
 * Reset any old panel-head offsets that can push
 * text into the curved edge.
 */
.r7-codshipx > .module-head + article.panel > .panel-head {
    margin: 0;
    padding: 0;

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

    gap: 22px;

    overflow: visible;
}


.r7-codshipx > .module-head + article.panel
    > .panel-head
    > div:first-child {

    flex: 1 1 620px;
    min-width: 0;

    margin: 0;
    padding: 0 0 0 2px;
}


.r7-codshipx > .module-head + article.panel
    .section-kicker {

    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 7px;

    color: #7a8ba1;

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

    letter-spacing: .09em;
}


/* Small premium connection icon */
.r7-codshipx > .module-head + article.panel
    .section-kicker::before {

    content: "↗";

    display: inline-grid;
    place-items: center;

    width: 22px;
    height: 22px;

    flex: 0 0 22px;

    border: 1px solid #d7eab7;
    border-radius: 7px;

    background: #f0f9df;

    color: #69aa00;

    font-size: 13px;
    line-height: 1;
}


.r7-codshipx > .module-head + article.panel h2 {
    margin: 0;

    color: var(--cx62-ink);

    font-size: clamp(19px, 1.45vw, 23px);
    font-weight: 850;

    line-height: 1.2;

    letter-spacing: -.025em;

    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


.r7-codshipx > .module-head + article.panel p {
    max-width: 940px;

    margin: 7px 0 0;

    color: var(--cx62-muted);

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

    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}


/* Generate QR */
.r7-codshipx > .module-head + article.panel
    .button.primary {

    min-height: 47px;

    flex: 0 0 auto;

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

    gap: 9px;

    padding-inline: 20px;

    border-radius: 13px;

    font-weight: 850;

    box-shadow:
        0 8px 18px rgba(119, 183, 10, .18);
}


.r7-codshipx > .module-head + article.panel
    .button.primary::before {

    content: "▦";

    font-size: 16px;
    line-height: 1;
}


/*
 * Client ID + OTP / Safety cards
 */
.r7-codshipx .r63-link-grid {
    gap: 18px;
}


.r7-codshipx :is(
    .r63-link-card,
    .r63-safety-card
) {
    border: 1px solid var(--cx62-line);

    border-radius: 18px;

    padding: 25px 26px;

    background: #fff;

    box-shadow:
        0 10px 28px rgba(19, 42, 66, .06);
}


.r7-codshipx .r63-link-card h2 {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-top: 8px;

    color: var(--cx62-ink);

    line-height: 1.28;

    white-space: normal;
}


.r7-codshipx .r63-link-card h2::before {
    content: "↔";

    display: inline-grid;
    place-items: center;

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    border: 1px solid #dcebc3;
    border-radius: 9px;

    background: #f2f9e7;

    color: #68a807;

    font-size: 15px;
}


.r7-codshipx .r63-link-card > p,
.r7-codshipx .r63-safety-card p {
    color: var(--cx62-muted);

    line-height: 1.55;
}


.r7-codshipx .r63-safety-card
    > .commerce-icon {

    width: 45px;
    height: 45px;

    border-radius: 14px;

    box-shadow:
        0 7px 18px rgba(130, 197, 20, .13);
}


/*
 * Form controls
 */
.r7-codshipx .r63-link-card label > span {
    display: block;

    margin-bottom: 8px;

    color: #687a92;

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


.r7-codshipx .r63-link-card input {
    width: 100%;

    min-height: 49px;

    border: 1px solid #dce5ec;
    border-radius: 13px;

    background: #fbfcfd;

    padding-inline: 14px;

    color: var(--cx62-ink);

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}


.r7-codshipx .r63-link-card input:focus {
    outline: none;

    border-color: #a9d95f;

    background: #fff;

    box-shadow:
        0 0 0 4px rgba(145, 207, 37, .10);
}


.r7-codshipx .r63-link-card
    .button.primary {

    min-height: 48px;

    border-radius: 13px;

    font-weight: 850;
}


/*
 * Connected seller status card
 */
.r7-codshipx .r63-link-status {
    border: 1px solid #dfe8ee;

    border-radius: 18px;

    padding: 20px 22px;

    background:
        linear-gradient(
            180deg,
            #fff,
            #fbfcfd
        );

    box-shadow:
        0 10px 28px rgba(19, 42, 66, .055);
}


.r7-codshipx .r63-linked-dot {
    width: 11px;
    height: 11px;

    box-shadow:
        0 0 0 6px rgba(145, 207, 37, .14);
}


/*
 * Mobile / narrow desktop
 */
@media (max-width: 900px) {

    .r7-codshipx > .module-head + article.panel {
        padding: 21px 20px 22px;
    }

    .r7-codshipx > .module-head + article.panel
        > .panel-head {

        align-items: stretch;
        flex-direction: column;
    }

    .r7-codshipx > .module-head + article.panel
        .button.primary {

        width: 100%;
    }

    .r7-codshipx :is(
        .r63-link-card,
        .r63-safety-card
    ) {
        padding: 20px;
    }
}
