
/* ==========================================
   SCRIPOWN PUBLICATIONS
   BECOME AN EDITED BOOK EDITOR POPUP
   Dedicated stylesheet
========================================== */

#spEditorPopup,
#spEditorPopup *,
#spEditorFloating,
#spEditorFloating * {
    box-sizing: border-box;
}

#spEditorPopup {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(5, 19, 35, .76);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

#spEditorPopup.sp-visible {
    opacity: 1;
    visibility: visible;
}

#spEditorPopup .sp-editor-modal {
    position: relative;
    width: 100%;
    max-width: 920px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 70px rgba(0,0,0,.3);
    transform: translateY(12px);
    transition: transform .22s ease;
}

#spEditorPopup.sp-visible .sp-editor-modal {
    transform: translateY(0);
}

/* HEADER */

#spEditorPopup .sp-editor-header {
    min-height: 85px;
    background: #102f50;
    padding: 10px 32px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-bottom: 3px solid #d6a33e;
}

#spEditorPopup .sp-editor-header img {
    width: 180px;
    height: 68px;
    object-fit: contain;
    object-position: left center;
}

#spEditorPopup .sp-editor-header > span {
    color: #e8edf3;
    font-size: 13px;
    border-left: 1px solid rgba(255,255,255,.35);
    padding-left: 20px;
}

/* CLOSE BUTTON */

#spEditorPopup .sp-editor-close {
    position: absolute;
    top: 12px;
    right: 13px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #102f50;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* BODY */

#spEditorPopup .sp-editor-body {
    display: grid;
    grid-template-columns: 1.35fr .85fr;
}

#spEditorPopup .sp-editor-left {
    padding: 30px 30px 24px;
}

#spEditorPopup .sp-editor-tag {
    display: inline-block;
    background: #fff1d2;
    color: #a66d12;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

#spEditorPopup .sp-editor-left h2 {
    font-family: Georgia, serif;
    color: #102f50;
    font-size: clamp(35px, 4vw, 47px);
    line-height: 1.1;
    margin: 17px 0 10px;
    font-weight: 700;
}

#spEditorPopup .sp-editor-left h2 span {
    color: #bd8728;
}

#spEditorPopup .sp-editor-left h3 {
    font-size: 16px;
    line-height: 1.5;
    color: #173c60;
    margin: 0 0 12px;
    font-weight: 700;
}

#spEditorPopup .sp-editor-left > p {
    color: #596777;
    font-size: 13px;
    line-height: 1.75;
    margin: 0 0 18px;
}

/* BENEFITS */

#spEditorPopup .sp-editor-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-bottom: 20px;
}

#spEditorPopup .sp-editor-benefits > div {
    min-height: 62px;
    background: #f1f4f8;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    color: #142f4e;
    font-size: 11px;
}

#spEditorPopup .sp-benefit-icon {
    font-size: 21px;
    font-weight: 800;
    color: #bd8728;
}

#spEditorPopup .sp-editor-benefits strong {
    font-weight: 700;
}

/* CTA */

#spEditorPopup .sp-editor-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(110deg, #07518b, #092d55);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 800;
    transition: background .2s ease;
}

#spEditorPopup .sp-editor-cta:hover {
    background: #bd8728;
}

#spEditorPopup .sp-editor-cta span {
    font-size: 22px;
}

#spEditorPopup .sp-editor-note {
    text-align: center;
    color: #788493;
    font-size: 11px;
    line-height: 1.6;
    margin-top: 13px;
}

/* BOOK VISUAL */

#spEditorPopup .sp-editor-visual {
    min-height: 420px;
    background: radial-gradient(circle at 50% 40%,
        #315878 0%, #153c5d 52%, #0b2947 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#spEditorPopup .sp-editor-visual:before,
#spEditorPopup .sp-editor-visual:after {
    content: "";
    position: absolute;
    border: 1px solid rgba(225,183,91,.35);
    border-radius: 50%;
}

#spEditorPopup .sp-editor-visual:before {
    width: 360px;
    height: 360px;
}

#spEditorPopup .sp-editor-visual:after {
    width: 290px;
    height: 290px;
}

#spEditorPopup .sp-book-scene {
    position: relative;
    z-index: 2;
    text-align: center;
}

#spEditorPopup .sp-book-cover {
    width: 205px;
    height: 280px;
    background: linear-gradient(120deg, #173d62, #082745);
    border-left: 8px solid #d4a64b;
    border-right: 3px solid #d4a64b;
    border-bottom: 5px solid #d4a64b;
    border-radius: 3px 8px 8px 3px;
    box-shadow: 12px 17px 30px rgba(0,0,0,.38);
    padding: 24px 13px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: perspective(700px) rotateY(-5deg);
}

#spEditorPopup .sp-book-ribbon {
    background: #e5b650;
    color: #142d48;
    font-size: 10px;
    font-weight: 900;
    padding: 7px 15px;
    margin-bottom: 25px;
    letter-spacing: 1px;
}

#spEditorPopup .sp-book-title {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
}

#spEditorPopup .sp-book-symbol {
    font-size: 43px;
    color: #e7bd61;
    margin-top: 18px;
}

#spEditorPopup .sp-book-doi {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    margin-top: 17px;
    color: #e8c46e;
}

#spEditorPopup .sp-book-caption {
    color: #edc66f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-top: 24px;
}

/* BOTTOM STRIP */

#spEditorPopup .sp-editor-bottom {
    background: #f1f4f8;
    border-top: 1px solid #e2e7ed;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #203d5c;
    font-size: 13px;
    line-height: 1.6;
}

#spEditorPopup .sp-bottom-icon {
    font-size: 28px;
    color: #bd8728;
}

/* FLOATING BUTTON */

#spEditorFloating {
    position: fixed;
    z-index: 99989;
    bottom: 22px;
    right: 20px;
    padding: 6px 39px 6px 8px;
    background: #102f50;
    border: 1px solid #d6a33e;
    border-radius: 50px;
    box-shadow: 0 5px 22px rgba(0,0,0,.2);
    align-items: center;
}

#spEditorFloating:not([hidden]) {
    display: flex;
}

#spEditorFloating a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    padding: 3px 7px;
}

#spEditorFloating .sp-floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #e5b650;
    color: #102f50;
    border-radius: 50%;
}

#spEditorFloating button {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 23px;
    height: 23px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    color: white;
    font-size: 17px;
    cursor: pointer;
}

/* MOBILE */

@media (max-width: 600px) {

    #spEditorPopup {
        padding: 12px;
    }

    #spEditorPopup .sp-editor-modal {
        max-width: 390px;
        max-height: 90vh;
        max-height: 90dvh;
        overflow-y: auto;
        border-radius: 13px;
    }

    #spEditorPopup .sp-editor-header {
        min-height: 69px;
        padding: 7px 16px;
        gap: 10px;
    }

    #spEditorPopup .sp-editor-header img {
        width: 140px;
        height: 52px;
    }

    #spEditorPopup .sp-editor-header > span {
        font-size: 9px;
        padding-left: 10px;
        max-width: 105px;
    }

    #spEditorPopup .sp-editor-close {
        width: 29px;
        height: 29px;
        top: 7px;
        right: 7px;
        font-size: 21px;
    }

    #spEditorPopup .sp-editor-body {
        display: block;
    }

    #spEditorPopup .sp-editor-left {
        padding: 23px 18px 20px;
    }

    #spEditorPopup .sp-editor-tag {
        font-size: 9px;
        padding: 7px 11px;
    }

    #spEditorPopup .sp-editor-left h2 {
        font-size: 35px;
        margin: 14px 0 9px;
    }

    #spEditorPopup .sp-editor-left h3 {
        font-size: 14px;
    }

    #spEditorPopup .sp-editor-left > p {
        font-size: 12px;
        line-height: 1.65;
    }

    #spEditorPopup .sp-editor-benefits {
        gap: 7px;
    }

    #spEditorPopup .sp-editor-benefits > div {
        min-height: 58px;
        font-size: 10px;
        padding: 7px;
    }

    #spEditorPopup .sp-editor-cta {
        font-size: 15px;
        padding: 13px;
    }

    #spEditorPopup .sp-editor-visual {
        display: none;
    }

    #spEditorPopup .sp-editor-bottom {
        padding: 12px 16px;
        font-size: 11px;
    }

    #spEditorFloating {
        bottom: 14px;
        right: 12px;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
    #spEditorPopup,
    #spEditorPopup .sp-editor-modal {
        transition: none;
    }
}

/* Move Become an Editor button to bottom-left */

#spEditorFloating {
    right: auto !important;
    left: 20px !important;
    bottom: 22px !important;
}

/* Mobile positioning */

@media (max-width: 600px) {
    #spEditorFloating {
        right: auto !important;
        left: 12px !important;
        bottom: 14px !important;
    }
}
