/* ============================================
   PROMPT SUBMISSION FORM
   ============================================ */

/* ---- Hero ---- */
.rn-prompt-submit-hero {
    background: var(--rn-secondary);
    color: var(--rn-white);
    padding: 3rem 0 2.5rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.rn-prompt-submit-hero__title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 0.5rem;
}

.rn-prompt-submit-hero__subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Container ---- */
.rn-prompt-submit {
    max-width: 720px;
    margin: 0 auto 3rem;
}

.rn-prompt-submit__header {
    margin-bottom: 1.5rem;
}

.rn-prompt-submit__header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rn-secondary);
    margin-bottom: 0.375rem;
}

.rn-prompt-submit__header p {
    font-size: 0.9375rem;
    color: var(--rn-gray-500);
    line-height: 1.6;
}

/* ---- Notice (login / max pending) ---- */
.rn-prompt-submit__notice {
    background: var(--rn-gray-50);
    border: 1px solid var(--rn-gray-200);
    border-radius: var(--rn-radius-lg);
    padding: 1.25rem 1.5rem;
}

.rn-prompt-submit__notice--warning {
    background: #FEF3C7;
    border-color: #F59E0B;
}

.rn-prompt-submit__notice p {
    font-size: 0.9375rem;
    color: var(--rn-gray-600);
    margin: 0;
}

.rn-prompt-submit__notice a {
    color: var(--rn-primary);
    font-weight: 600;
    text-decoration: none;
}

.rn-prompt-submit__notice a:hover {
    text-decoration: underline;
}

/* ---- Form ---- */
.rn-prompt-submit__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ---- Field ---- */
.rn-prompt-submit__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.rn-prompt-submit__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rn-secondary);
}

.rn-prompt-submit__required {
    color: #DC2626;
}

.rn-prompt-submit__input,
.rn-prompt-submit__select,
.rn-prompt-submit__textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-family: var(--rn-font-sans);
    color: var(--rn-gray-800);
    background: var(--rn-white);
    border: 1px solid var(--rn-gray-200);
    border-radius: var(--rn-radius-md);
    transition: border-color var(--rn-transition), box-shadow var(--rn-transition);
}

.rn-prompt-submit__input:focus,
.rn-prompt-submit__select:focus,
.rn-prompt-submit__textarea:focus {
    outline: none;
    border-color: var(--rn-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rn-prompt-submit__input::placeholder,
.rn-prompt-submit__textarea::placeholder {
    color: var(--rn-gray-400);
}

.rn-prompt-submit__textarea {
    resize: vertical;
    min-height: 80px;
}

.rn-prompt-submit__textarea--mono {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    background: var(--rn-gray-50);
}

.rn-prompt-submit__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.rn-prompt-submit__hint {
    font-size: 0.75rem;
    color: var(--rn-gray-400);
}

.rn-prompt-submit__counter {
    font-size: 0.75rem;
    color: var(--rn-gray-400);
    text-align: right;
}

.rn-prompt-submit__counter.is-near-limit {
    color: #F59E0B;
}

.rn-prompt-submit__counter.is-at-limit {
    color: #DC2626;
}

/* ---- Two-column row ---- */
.rn-prompt-submit__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ---- Footer ---- */
.rn-prompt-submit__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.5rem;
}

.rn-prompt-submit__message {
    font-size: 0.875rem;
    font-weight: 500;
}

.rn-prompt-submit__message.is-success {
    color: #047857;
}

.rn-prompt-submit__message.is-error {
    color: #DC2626;
}

.rn-prompt-submit__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.rn-prompt-submit__disclaimer {
    font-size: 0.75rem;
    color: var(--rn-gray-400);
    line-height: 1.6;
    margin-top: 0.25rem;
}

/* ---- Success state ---- */
.rn-prompt-submit__success {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--rn-gray-50);
    border: 1px solid var(--rn-gray-200);
    border-radius: var(--rn-radius-lg);
}

.rn-prompt-submit__success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: #D1FAE5;
    border-radius: var(--rn-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #047857;
}

.rn-prompt-submit__success h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rn-secondary);
    margin-bottom: 0.5rem;
}

.rn-prompt-submit__success p {
    font-size: 0.9375rem;
    color: var(--rn-gray-500);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* ---- Contributor badge (on prompt cards) ---- */
.rn-prompt-card__contributor {
    display: block;
    font-size: 0.6875rem;
    color: var(--rn-gray-400);
    margin-top: 0.25rem;
}

.rn-prompt-card__contributor a {
    color: var(--rn-primary);
    font-weight: 600;
    text-decoration: none;
}

.rn-prompt-card__contributor a:hover {
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .rn-prompt-submit-hero__title {
        font-size: 1.75rem;
    }

    .rn-prompt-submit__row {
        grid-template-columns: 1fr;
    }

    .rn-prompt-submit__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .rn-prompt-submit__message {
        text-align: center;
    }
}
