/* Post-ad CSS split from style.css.
 * Listing pages load style.css only (faster first paint).
 * Post-ad loads style.css then this file.
 * These rules are copied verbatim from sexer.ee GO OLD style.css
 * so posting looks and behaves like the old single CSS file.
 */

/* OLD style.css 1283-1576 */
.step {
    display: none;
}

.step.active {
    display: block;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.step-indicator {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.3s;
}

.step-indicator.active {
    background-color: transparent;
    color: black;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    /* margin-top: 20px; */
}

.image-placeholder,
.image-item {
    position: relative;
    height: 100px;
    background-color: #F9F7F7;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    /* box-shadow, not filter:drop-shadow — Chrome Android GPU noise bars on the grid */
    box-shadow: 0 4px 4px rgba(0, 0, 0, .05);
    filter: none;
}

/* Chrome phone: let Sortable own the gesture (scroll must not steal tile drags). */
#step2 #imagePreview .image-item {
    touch-action: none;
}

.image-item img {
    max-width: 100%;
    max-height: fit-content;
    object-fit: cover;
}

#step2 .image-item.is-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: #1a1224;
}
#step2 .image-item.is-video video::-webkit-media-controls,
#step2 .image-item.is-video video::-webkit-media-controls-enclosure,
#step2 .image-item.is-video video::-webkit-media-controls-panel,
#step2 .image-item.is-video video::-webkit-media-controls-timeline,
#step2 .image-item.is-video video::-webkit-media-controls-start-playback-button {
    display: none !important;
    opacity: 0 !important;
    -webkit-appearance: none;
}

.image-item img {
    max-width: 100%;
    max-height: fit-content;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.remove-icon {
    touch-action: manipulation;
}

.main-image {
    background-color: #F9F7F7;
    border: 2px solid #007bff;
    border-radius: 5px;
    margin-left: 20px;
    height: 320px;
    max-height: 320px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    min-width: 0;
    min-height: 0;
}

/* Must live in this file: style.css mobile override is beaten by the desktop
   .main-image { margin-left: 20px } above (CSS split). xportal has one file so
   the 1024px rule wins. Chrome phone was 20px narrower / shifted. */
@media only screen and (max-width: 1024px) {
    .main-image {
        margin-left: 0;
        margin-top: 19px;
        max-width: 100%;
    }
    /* Chrome phone — same tight stepper as the Samsung override (not UA-gated). */
    .steps-n {
        margin-bottom: 2px;
    }
    .step-indicator {
        padding: 6px 4px 0;
    }
    .step-indicator > div:not(.steps-n) {
        margin: 0;
        padding: 0 4px;
        line-height: 1;
    }
    /* Chrome phone grid: kill GPU filter compositing (black/rainbow noise bands). */
    #step2 .image-preview {
        isolation: isolate;
    }
    #step2 .image-placeholder,
    #step2 .image-item {
        filter: none !important;
        -webkit-filter: none !important;
        overflow: hidden;
        box-shadow: 0 4px 4px rgba(0, 0, 0, .05);
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Side-by-side from tablet up, including tall/narrow desktop (orientation: portrait). */
@media (min-width: 768px) {
    #step2 > .row {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    #step2 > .row > .col-md-7 {
        flex: 0 0 58.33333333%;
        max-width: 58.33333333%;
        width: 58.33333333%;
    }
    #step2 > .row > .col-md-5 {
        flex: 0 0 41.66666667%;
        max-width: 41.66666667%;
        width: 41.66666667%;
    }
    #step2 .main-image {
        margin-left: 20px;
        margin-top: 0;
        max-width: none;
    }
}

/* Phone landscape + narrow desktop: keep grid | camera (Bootstrap md stacks <768). */
@media (orientation: landscape) {
    #step2 > .row {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    #step2 > .row > .col-md-7 {
        flex: 0 0 58.33333333%;
        max-width: 58.33333333%;
        width: 58.33333333%;
    }
    #step2 > .row > .col-md-5 {
        flex: 0 0 41.66666667%;
        max-width: 41.66666667%;
        width: 41.66666667%;
    }
    #step2 .main-image {
        margin-left: 20px;
        margin-top: 0;
        max-width: none;
    }
}

.add-img {
    width: 40px;
    height: 40px;
    fill: #007bff;
}

.instructions {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

.btn-next {
    background-color: green;
    color: white;
    border: none;
    margin-top: 20px;
    float: right;
}

.btn-back {
    /* background-color: green; */
    color: white;
    border: none;
}

/* Post-ad step 2: upload progress (day view) */
#step2 .post-ad-upload-progress {
    display: none;
    margin: 16px 0 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    box-sizing: border-box;
    max-width: 100%;
}

#step2 .post-ad-upload-progress.is-visible {
    display: block !important;
}

#step2 .post-ad-upload-progress__label {
    margin: 0 0 8px;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    color: #008000;
    text-transform: lowercase;
}

#step2 .post-ad-upload-progress__track {
    display: block;
    width: 100%;
    height: 14px;
    border-radius: 7px;
    background: #d8d8d8;
    overflow: hidden;
}

#step2 .post-ad-upload-progress__fill {
    display: block;
    height: 100%;
    width: 0%;
    min-width: 0;
    border-radius: 7px;
    background: linear-gradient(90deg, #1e7e34 0%, #28a745 50%, #34c759 100%);
    transition: width 0.2s ease;
}

#step2 .post-ad-upload-progress__pct {
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    font-weight: 800;
    color: #1e7e34;
    text-align: right;
}

/* Night view: violet panel, same green bar */
html.dark-mode #step2 .post-ad-upload-progress,
.dark-mode #step2 .post-ad-upload-progress {
    background: #591e98;
    border: 1px solid #591e98;
}

html.dark-mode #step2 .post-ad-upload-progress__label,
.dark-mode #step2 .post-ad-upload-progress__label {
    color: #008000;
}

html.dark-mode #step2 .post-ad-upload-progress__track,
.dark-mode #step2 .post-ad-upload-progress__track {
    background: #3d1469;
}

html.dark-mode #step2 .post-ad-upload-progress__pct,
.dark-mode #step2 .post-ad-upload-progress__pct {
    color: #34c759;
}

/* Back button stays red while upload is in progress (avoid Bootstrap disabled → white) */
#multiStepForm .btn-red.btn-back.post-ad-btn-busy,
#multiStepForm .btn-red.btn-back:disabled {
    background: #ff004c !important;
    background-color: #ff004c !important;
    border-color: #ff004c !important;
    color: #fff !important;
    opacity: 0.85;
    pointer-events: none;
    cursor: not-allowed;
}

.dark-mode #multiStepForm .btn-red.btn-back.post-ad-btn-busy,
.dark-mode #multiStepForm .btn-red.btn-back:disabled {
    background: #ff004c !important;
    background-color: #ff004c !important;
    border-color: #ff004c !important;
    color: #fff !important;
}

/* Post-ad BACK/NEXT: no color shift on hover/focus/active */
#multiStepForm .btn-success.btn-next,
#multiStepForm .btn-success.btn-next:hover,
#multiStepForm .btn-success.btn-next:focus,
#multiStepForm .btn-success.btn-next:focus-visible,
#multiStepForm .btn-success.btn-next:active {
    background: green !important;
    background-color: green !important;
    border-color: green !important;
    color: #fff !important;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
}

#multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy),
#multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy):hover,
#multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy):focus,
#multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy):focus-visible,
#multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy):active {
    background: #ff004c !important;
    background-color: #ff004c !important;
    border-color: #ff004c !important;
    color: #fff !important;
    box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
}

.btn-preview {
    background-color: red;
    color: white;
    border: none;
}

.steps-n {
    width: 72px;
    height: 72px;
    font-size: 30px;
    line-height: 52px;
    text-align: center;
    background: #F8F2FF;
    border-radius: 50%;
    padding: 10px;
    margin: 0 auto 2px;
    color: #AB7AE4;

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

.step-indicator > div:not(.steps-n) {
    margin: 0;
    padding: 0 4px;
    line-height: 1;
}

.step-indicator.active {
    /* Active step: number inside the violet circle and the label under it both go
       green (#00c853 — same green as the active gallery/mobile-menu dot). The
       circle's violet background (.steps-n) is intentionally NOT changed. */
    color: #00c853;
    font-weight: 900;
}

.step-indicator.active .steps-n {
    color: #00c853;
}

.dark-mode .step-indicator.active .steps-n {
    /* Dark-mode rule above forces .steps-n color with !important; raise specificity
       and !important so the active-state green wins. */
    color: #00c853 !important;
}

/* @media screen and (min-width: 992px) { */
/* .step-indicator#stepIndicator1::after {
      position: absolute;
      content: '';
      top: 244px;
      width: 160px;
      height: 33px;
      background: url(https://sexer.ee/images/svg/line-indicator.svg) no-repeat;
      margin-left: 61px;
    }

    .step-indicator#stepIndicator2::after {
      position: absolute;
      content: '';
      top: 233px;
      width: 160px;
      height: 33px;
      background: url(https://sexer.ee/images/svg/line-indicator.svg) no-repeat;
      margin-left: 61px;
    } */

.step-indicator:nth-child(2)::after {
    /* right: 0; */
    transform: rotate(180deg);
    /* margin-top: -32px;  */
}


/* OLD style.css 3919-4016 */
#multiStepForm #step1 > .row > .col-md-6 > .mb-3,
#multiStepForm #step1 .post-ad-step1-top > .col-md-6 > .mb-3 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#multiStepForm #step1 > .row > .col-md-6:last-child > .mb-3,
#multiStepForm #step1 .post-ad-step1-top > .col-md-6:last-child > .mb-3,
#multiStepForm #step1 .post-ad-step1-description {
    display: flex;
    flex-direction: column;
}

#multiStepForm #step1 .post-ad-step1-link-row {
    margin-top: 0;
}

#multiStepForm #step1 .post-ad-step1-telegram {
    margin-bottom: 0;
}

#multiStepForm #step1 .post-ad-step1-next-col {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

#multiStepForm #step1 .post-ad-step1-next-col .btn-next {
    margin-top: 0;
    float: none;
    width: 100%;
}

#multiStepForm #step1 .post-ad-step1-bottom {
    margin-top: 0.5rem;
}

#multiStepForm #step1 .post-ad-step1-bottom .post-ad-step1-signal,
#multiStepForm #step1 .post-ad-step1-bottom .post-ad-step1-email {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

#multiStepForm #step1 .post-ad-step1-signal label[for="signal-link"],
#multiStepForm #step1 .post-ad-step1-email label[for="email"] {
    display: block;
    margin-bottom: 0;
}

#multiStepForm #step1 .post-ad-step1-telegram label[for="telegram-link"] {
    display: block;
    margin-bottom: 0;
}

#multiStepForm #step1 .post-ad-step1-next-mobile {
    display: none;
    margin-top: 0.75rem;
}

#multiStepForm #step1 .post-ad-step1-next-mobile .btn-next {
    width: 100%;
    margin-top: 0;
    float: none;
}

@media only screen and (max-width: 767.98px) and (orientation: portrait) {
    #multiStepForm #step1 .post-ad-step1-next-mobile {
        display: block;
    }

    #multiStepForm #step1 .post-ad-step1-next-col {
        display: none !important;
    }
}

#multiStepForm #step1 select#section.form-select::-ms-expand,
#multiStepForm #step1 select#location.form-select::-ms-expand {
    display: none;
}

/* Post-ad step 1: user-typed fields + "characters left" — normal weight (body uses Manrope 800 only). */
#multiStepForm #step1 #name,
#multiStepForm #step1 #telephone,
#multiStepForm #step1 #email,
#multiStepForm #step1 #telegram-link,
#multiStepForm #step1 #signal-link,
#multiStepForm #step1 #description,
#multiStepForm #step1 .form-text.chatlimitcolorclass,
#multiStepForm #charCount,
#multiStepForm #charNameCount,
#multiStepForm #charTelephoneCount,
#multiStepForm #charEmailCount {
    font-family: var(--font-body) !important;
    font-weight: 400 !important;
    font-variation-settings: normal !important;
}

/* Telegram hint must stay readable on dark fields (Bootstrap light placeholder is near-invisible). */
#multiStepForm #step1 #telegram-link::placeholder {
    color: #8a847a !important;
    opacity: 1 !important;
}
html.dark-mode #multiStepForm #step1 #telegram-link::placeholder,
.dark-mode #multiStepForm #step1 #telegram-link::placeholder {
    color: #9a948a !important;
    opacity: 1 !important;
}
html:not(.dark-mode) #multiStepForm #step1 #telegram-link::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* OLD style.css 4953-4956 */
.dark-mode .steps-n {
    background-color: #591e98;
    color: #d1cbc1 !important;
}

/* OLD style.css 4985-5000 */
.dark-mode .image-placeholder,
.dark-mode .image-item {
    border: 1px solid #591e98;
    background-color: #591e98;
}

.dark-mode .main-image {
    background-color: #591e98;
    border: 2px solid #591e98;
}

.dark-mode .add-img {
    width: 40px;
    height: 40px;
    fill: green;
}

/* OLD style.css 7016-7019 */
.dark-mode #multiStepForm input,
.dark-mode #multiStepForm textarea {
    color: #B0B3B8 !important;
}

/* OLD style.css 7952-7978 */
/* Post-ad page: night view — inactive step labels and other white text use step-number gray */
.dark-mode .container.mb-3:has(#multiStepForm),
.dark-mode .container.mb-3:has(#multiStepForm) .step-indicators .step-indicator:not(.active) {
    color: #d1cbc1 !important;
}

.dark-mode .step-indicators .step-indicator.active {
    color: #00c853 !important;
}

/* Post-ad night view: inactive step labels (text under circles) match violet circle */
.dark-mode .container.mb-3:has(#multiStepForm) .step-indicators .step-indicator:not(.active) > div:not(.steps-n) {
    color: #591e98 !important;
}

.dark-mode #multiStepForm .btn-next,
.dark-mode #multiStepForm .btn-success.btn-next,
.dark-mode #multiStepForm .btn-red.btn-back:not(:disabled):not(.post-ad-btn-busy),
.dark-mode #multiStepForm #step3 .payment-item__text,
.dark-mode #multiStepForm #step3 .payment-box,
.dark-mode #multiStepForm .instructions {
    color: #d1cbc1 !important;
}

.dark-mode #multiStepForm label.form-label {
    color: #828282 !important;
}

/* Social app checkboxes: same 18px checked/unchecked, NEXT-button green when on. */
#multiStepForm #step1 .pad-app-net input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid green !important;
    border-radius: 2px !important;
    background-color: transparent !important;
    background-image: none !important;
    display: inline-block !important;
    position: relative !important;
    overflow: hidden !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    accent-color: green !important;
}
#multiStepForm #step1 .pad-app-net input[type="checkbox"]:checked {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    background-color: green !important;
    border-color: green !important;
}
#multiStepForm #step1 .pad-app-net input[type="checkbox"]:checked::after {
    content: "\2714" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 none !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    transform: translate(-50%, -50%) !important;
    -webkit-transform: translate(-50%, -50%) !important;
    text-align: center !important;
    display: block !important;
    pointer-events: none !important;
}
html.dark-mode #multiStepForm #step1 .pad-app-net input[type="checkbox"] {
    background-color: transparent !important;
    border-color: green !important;
}
html.dark-mode #multiStepForm #step1 .pad-app-net input[type="checkbox"]:checked {
    background-color: green !important;
    border-color: green !important;
}

.site-swal-dark .swal2-icon.swal2-warning,
.site-swal-light .swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

