/* CaptchaPress - frontend styles. Fluid layout: every widget is width:100%
   of its host container with a max-width cap, no internal pixel widths. */
.captchapress-widget {
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 300px;
    padding: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 10px;
    background: #fafafa;
    font-family: inherit;
    font-size: 14px;
    margin: 8px 0;
}

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

.captchapress-widget.is-locked .captchapress-stage {
    pointer-events: none;
    opacity: .55;
}

.captchapress-widget.is-locked .captchapress-reload-icon {
    animation: captchapress-spin .8s linear infinite;
}

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

.captchapress-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    min-height: 28px;
}

.captchapress-status {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
    color: #555;
    word-wrap: break-word;
}

.captchapress-reload {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.captchapress-reload:hover {
    background: #f3f5ff;
    border-color: #5a8bff;
    color: #5a8bff;
}

.captchapress-reload:active {
    transform: scale(0.94);
}

.captchapress-reload:focus-visible {
    outline: 2px solid #5a8bff;
    outline-offset: 2px;
}

.captchapress-reload-icon {
    display: block;
}

/* Honeypot: always hidden, even to screen readers, but DOM-present. */
.captchapress-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ---------- Slider style ---------- */
.captchapress-slider {
    width: 100%;
}

.captchapress-slider-prompt {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
}

.captchapress-slider-track {
    position: relative;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, #e8e8e8, #f5f5f5);
    border-radius: 20px;
    border: 1px solid #d0d0d0;
    overflow: hidden;
    touch-action: none;
}

.captchapress-slider-target {
    position: absolute;
    top: 3px;
    height: 32px;
    width: 32px;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.18) url("../img/key-success.png") no-repeat center;
    background-size: 90%;
    border: 1px dashed rgba(76, 175, 80, 0.7);
    border-radius: 16px;
}

.captchapress-slider-handle {
    position: absolute;
    left: 0;
    top: 1px;
    width: 36px;
    height: 36px;
    background: linear-gradient(180deg, #ffffff, #e6e6e6);
    border: 1px solid #b5b5b5;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    cursor: grab;
    color: #333;
    font-size: 22px;
    line-height: 1;
    user-select: none;
    touch-action: none;
    padding: 4px;
}

.captchapress-slider-handle:active {
    cursor: grabbing;
}

.captchapress-slider-track .icon.key {
    background: url("../img/key.png") no-repeat;
    background-size: contain;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.captchapress-slider-track .icon.key.success {
    background: url("../img/key-success.png") no-repeat;
    background-size: contain;
    display: inline-block;
    width: 100%;
    height: 100%;

}

/* ---------- Puzzle style ---------- */
.captchapress-puzzle {
    position: relative;
    display: block;
    width: 100%;
}

.captchapress-puzzle-board {
    display: block;
    width: 100%;
    height: auto;
    /* Belt-and-suspenders: even if the browser ignores SVG intrinsic sizing,
       aspect-ratio gives the board a definite, proportional height. */
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

.captchapress-puzzle-piece {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35));
}

.captchapress-puzzle-track {
    position: relative;
    display: block;
    width: 100%;
    height: 34px;
    margin-top: 8px;
    background: #ececec;
    border-radius: 17px;
    border: 1px solid #d0d0d0;
    touch-action: none;
}

.captchapress-puzzle-handle {
    position: absolute;
    top: 2px;
    left: 0;
    width: 48px;
    height: 28px;
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #ffffff, #e2e2e2);
    border: 1px solid #b5b5b5;
    border-radius: 14px;
    cursor: grab;
    color: #333;
    user-select: none;
    touch-action: none;
    z-index: 2;
}

.captchapress-puzzle-handle:active {
    cursor: grabbing;
}

.captchapress-puzzle-handle .icon.puzzle {
    background: url("../img/puzzle.png") no-repeat center;
    background-size: 20px;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.captchapress-puzzle-handle .icon.puzzle.success-status {
    background: url("../img/puzzle-success.png") no-repeat center;
    background-size: 20px;
    display: inline-block;
    width: 100%;
    height: 100%;
}

/* ---------- Shapes ---------- */
.captchapress-shapes {
    width: 100%;
}

.captchapress-shapes-prompt {
    font-size: 13px;
    color: #444;
    margin-bottom: 10px;
}

.captchapress-shapes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
}

.captchapress-shape {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: border-color .15s ease, transform .1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captchapress-shape svg {
    width: 100%;
    height: auto;
    max-width: 56px;
    display: block;
}

.captchapress-shape:hover {
    transform: scale(1.05);
}

.captchapress-shape[aria-pressed="true"] {
    border-color: #1976d2;
    background: #e3f2fd;
}

.captchapress-shapes-submit {
    margin-top: 12px !important;
}

.captchapress-shapes-error {
    margin-top: 8px;
    padding: 8px 10px;
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    color: #c62828;
    font-size: 13px;
    line-height: 1.4;
}

/* ---------- Text ---------- */
.captchapress-text {
    width: 100%;
}

.captchapress-text-prompt {
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
}

.captchapress-text-svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #f4f4f4;
    user-select: none;
}

.captchapress-text-input {
    margin-top: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.captchapress-widget-puzzle,
.captchapress-widget-shapes,
.captchapress-widget-slider {
    display: none;
}

.captchapress-imnotrobot {
    margin: 8px 0 16px;
    cursor: pointer;
    max-width: 300px;
}

.captchapress-imnotrobot .inner-box {
    padding: 12px;
    display: flex;
    border: 2px solid #eee;
    background: #f8f8f8;
    justify-content: space-between;
}

.captchapress-imnotrobot .inner-box .cp-message {
    font-family:
            'Yekan Bakh', 'yekan bakh', 'YekanBakh', 'yekanbakh', 'Yekan-bakh', 'yekan-bakh', 'YekanBakhFaNum',
            'IranYekan', 'iranyekan', 'Iran Yekan', 'iran yekan', 'IranYekanWeb', 'iran-yekan',
            'Vazirmatn', 'vazirmatn', 'Vazir', 'vazir', 'VazirCode',
            'Yekan', 'yekan', 'BYekan', 'b yekan', 'B Yekan','parastoo',
            tahoma, sans-serif;
    line-height: 36px;
    font-size: 15px;
    font-weight: 500;
}

.captchapress-imnotrobot .inner-box .cp-checkbox {
    margin-left: 10px;
}



.captchapress-imnotrobot .inner-box .cp-icon {
    background: url("../img/robots/robot.png") no-repeat center;
    background-size: cover;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    margin-top: 2px;
}

.captchapress-imnotrobot .inner-box .cp-checkbox .empty {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 4px;
    width: 32px;
    height: 32px;
}

.captchapress-imnotrobot.success-status .inner-box .cp-checkbox .empty {
    background: url("../img/check-box.png") no-repeat center center;
    background-size: contain;
}


.captchapress-imnotrobot .d-flex {
    display: flex;
}

/* =========================================================================
   Light / Dark color modes
   -------------------------------------------------------------------------
   The theme class (captchapress-theme-light | -dark | -auto) is added by the
   server to BOTH the widget and the "I am not a robot" box. "Auto" is resolved
   on the client to captchapress-theme-dark when the visitor's device prefers a
   dark scheme (see applyAutoTheme() in captchapress.js), so only ONE dark rule
   set is needed here.

   These rules are scoped by the theme class (two-class specificity), so they
   layer on top of the default light styles above without changing them.
   ========================================================================= */

/* ---- Light (explicit): keeps the widget light even when the surrounding
        theme uses light-on-dark text/background. ---- */
.captchapress-theme-light.captchapress-widget {
    background: #fafafa;
    border-color: #d9d9d9;
    color: #333;
}
.captchapress-theme-light .captchapress-status { color: #555; }
.captchapress-theme-light .captchapress-slider-prompt,
.captchapress-theme-light .captchapress-shapes-prompt,
.captchapress-theme-light .captchapress-text-prompt { color: #444; }
.captchapress-theme-light .captchapress-text-input { background: #fff; border-color: #ccc; color: #333; }
.captchapress-theme-light .captchapress-shape { background: #fff; }
.captchapress-theme-light.captchapress-imnotrobot .inner-box { background: #f8f8f8; border-color: #eee; }
.captchapress-theme-light.captchapress-imnotrobot .inner-box .cp-message { color: #333; }

/* ---- Dark ---- */
.captchapress-theme-dark.captchapress-widget {
    background: #1e1f24;
    border-color: #3a3c44;
    color: #e6e6e6;
}
.captchapress-theme-dark .captchapress-status {
    color: #aeb6c2;
}
.captchapress-theme-dark .captchapress-reload {
    background: #2a2c33;
    border-color: #454852;
    color: #cfd4dd;
}
.captchapress-theme-dark .captchapress-reload:hover {
    background: #34373f;
    border-color: #5a8bff;
    color: #9db8ff;
}

/* Slider */
.captchapress-theme-dark .captchapress-slider-prompt {
    color: #b9c0cc;
}
.captchapress-theme-dark .captchapress-slider-track {
    background: linear-gradient(90deg, #2c2f36, #23252b);
    border-color: #454852;
}
.captchapress-theme-dark .captchapress-slider-handle {
    background: linear-gradient(180deg, #3a3d45, #2a2c33);
    border-color: #5a5e69;
    color: #e6e6e6;
}

/* Puzzle */
.captchapress-theme-dark .captchapress-puzzle-track {
    background: #23252b;
    border-color: #454852;
}
.captchapress-theme-dark .captchapress-puzzle-handle {
    background: linear-gradient(180deg, #3a3d45, #2a2c33);
    border-color: #5a5e69;
    color: #e6e6e6;
}

/* Shapes */
.captchapress-theme-dark .captchapress-shapes-prompt {
    color: #b9c0cc;
}
.captchapress-theme-dark .captchapress-shape {
    background: #2a2c33;
}
.captchapress-theme-dark .captchapress-shape[aria-pressed="true"] {
    border-color: #5a8bff;
    background: #243044;
}
.captchapress-theme-dark .captchapress-shapes-submit {
    background: #2a2c33 !important;
    border-color: #454852 !important;
    color: #e6e6e6 !important;
}
.captchapress-theme-dark .captchapress-shapes-error {
    background: #3a2326;
    border-color: #7d3a3a;
    color: #ffb3b3;
}

/* Text */
.captchapress-theme-dark .captchapress-text-prompt {
    color: #b9c0cc;
}
.captchapress-theme-dark .captchapress-text-input {
    background: #2a2c33;
    border-color: #454852;
    color: #e6e6e6;
}
.captchapress-theme-dark .captchapress-text-input::placeholder {
    color: #8a909c;
}
.captchapress-theme-dark .captchapress-text-svg {
    border-color: #454852;
}

/* "I am not a robot" box */
.captchapress-theme-dark.captchapress-imnotrobot .inner-box {
    background: #1e1f24;
    border-color: #3a3c44;
}
.captchapress-theme-dark.captchapress-imnotrobot .inner-box .cp-message {
    color: #e6e6e6;
}
.captchapress-theme-dark.captchapress-imnotrobot .inner-box .cp-checkbox .empty {
    background: #2a2c33;
    border-color: #454852;
}

.captchapress-theme-dark.captchapress-imnotrobot.success-status .inner-box .cp-checkbox .empty {
    background: url("../img/check-box.png") no-repeat center center;
    background-size: contain;
}