/* ── Shared form primitives (used by both submit and report forms) ──────── */

.cm-btn-primary {
    display: inline-block;
    background: #e0009d;
    color: #06062c;
    border: 1px solid #e0009d;
    border-radius: 0;
    padding: 10px 22px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.5s ease;
    box-shadow: 0 0 0 0 rgba(224, 0, 157, 0.5);
    line-height: 1.4;
}

.cm-btn-primary:hover:not(:disabled) {
    background: #b90082;
    border-color: #b90082;
    box-shadow: 0 0 2em 0 rgba(44, 44, 129, 0.8);
}

.cm-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cm-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    height: 0;
}

.cm-form-field {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cm-form-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.cm-form-field label span {
    color: #e0009d;
}

.cm-form-field input[type="url"],
.cm-form-field input[type="text"],
.cm-form-field input[type="email"],
.cm-form-field textarea {
    width: 100%;
    box-sizing: border-box;
    background: #404D72;
    border: 2px solid #404D72;
    border-radius: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 10px;
    line-height: 1.7;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.15s ease;
}

.cm-form-field input[type="url"]::placeholder,
.cm-form-field input[type="text"]::placeholder,
.cm-form-field input[type="email"]::placeholder,
.cm-form-field textarea::placeholder {
    color: #939FBF;
}

.cm-form-field input[type="url"]:focus,
.cm-form-field input[type="text"]:focus,
.cm-form-field input[type="email"]:focus,
.cm-form-field textarea:focus {
    border-color: #ffffff;
}

.cm-form-field textarea {
    resize: vertical;
    min-height: 90px;
}

.cm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .cm-form-row { grid-template-columns: 1fr; }
}

.cm-form-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cm-field-error {
    font-size: 0.8125rem;
    color: #ff6b6b;
    line-height: 1.4;
}

.cm-submit-status,
.cm-report-status {
    font-size: 0.875rem;
    line-height: 1.4;
}

.cm-submit-status--ok,
.cm-report-status--ok {
    color: #44bb77;
}

.cm-submit-status--error,
.cm-report-status--error {
    color: #ff6b6b;
}

/* ── Report link in modal footer ────────────────────────────────────────── */

.cm-report-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
    line-height: 1;
    white-space: nowrap;
}

.cm-report-link:hover {
    color: rgba(255, 255, 255, 0.65);
}

/* ── Report panel (inside plugin modal) ─────────────────────────────────── */

.cm-plugin-modal__report {
    padding-top: 20px;
}

.cm-report-header {
    margin-bottom: 6px;
}

.cm-report-back {
    position: absolute;
    top: 22px;
    left: 32px;
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.cm-report-back:hover {
    color: #ffffff;
}

.cm-report-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
}

.cm-report-plugin-name {
    margin: 0 0 20px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    word-break: break-word;
}

/* ── Select with custom arrow ───────────────────────────────────────────── */

.cm-select-wrap {
    position: relative;
}

.cm-select-wrap select {
    width: 100%;
    box-sizing: border-box;
    background-color: #404D72;
    background-image:
        linear-gradient(45deg, transparent 50%, #ffffff 50%),
        linear-gradient(135deg, #ffffff 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% + 2px),
        calc(100% - 13px) calc(50% + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    border: 2px solid #404D72;
    border-radius: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 36px 8px 10px;
    line-height: 1.7;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.cm-select-wrap select:focus {
    border-color: #ffffff;
}

.cm-select-wrap select option {
    background: #404D72;
    color: #ffffff;
}
