.prediction-section {
    min-width: 0;
}

#toast-root.toast-show {
    opacity: 1;
    transform: translateY(0);
}

#toast-root.toast-success {
    background: linear-gradient(135deg, #32b37b, #1e8f56);
}

#toast-root.toast-error {
    background: linear-gradient(135deg, #e65151, #c62828);
}

.prediction-form {
    height: fit-content;
}

.prediction-form__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem 1.25rem;
}

.prediction-field {
    min-width: 0;
}

.prediction-field--full {
    grid-column: 1 / -1;
}

.prediction-form .prediction-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    text-align: right;
}

.prediction-form .prediction-field input,
.prediction-form .prediction-field select,
.prediction-form .prediction-field textarea,
.prediction-otp-modal .prediction-field input {
    width: 100%;
    margin: 0;
    padding: 0.75rem;
    border: 1px solid #e8e3d5;
    border-radius: 8px;
    background: #fff;
    color: #2b2b2b;
    font: inherit;
    line-height: 1.6;
    transition: border-color 160ms ease, box-shadow 160ms ease,
        background-color 160ms ease;
}

.prediction-form .prediction-field textarea {
    min-height: 112px;
    resize: vertical;
}

.prediction-form #predict-price {
    direction: ltr;
    text-align: center;
}

.prediction-form #predict-week {
    direction: rtl;
    text-align: right;
}

.prediction-form #predict-mobile {
    text-align: center;
}

.prediction-form .prediction-field input:focus,
.prediction-form .prediction-field select:focus,
.prediction-form .prediction-field textarea:focus,
.prediction-otp-modal .prediction-field input:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(160, 140, 91, 0.14);
}

.prediction-form .prediction-field input.is-invalid,
.prediction-form .prediction-field select.is-invalid,
.prediction-form .prediction-field textarea.is-invalid,
.prediction-otp-modal .prediction-field input.is-invalid {
    border-color: #c62828;
    background: #fffafa;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.prediction-required {
    margin-right: 0.15rem;
    color: #c62828;
}

.prediction-price-preview,
.prediction-field__hint,
.prediction-field__error {
    display: block;
    min-height: 1.4rem;
    margin-top: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.6;
}

.prediction-price-preview {
    color: var(--brand-gold);
    font-weight: 700;
    text-align: center;
}

.prediction-field__hint {
    color: #777;
}

.prediction-field__error {
    color: #b71c1c;
    font-weight: 700;
}

.prediction-form__actions {
    display: flex;
    margin-top: 1.25rem;
}

.prediction-form__actions .button {
    width: 100%;
    min-height: 48px;
}

.prediction-form .button.is-loading,
.prediction-otp-modal .button.is-loading {
    cursor: wait;
    opacity: 0.72;
}

.prediction-button__busy {
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.prediction-button__busy:not([hidden]) {
    display: inline-flex;
}

.prediction-empty-state {
    display: flex;
    min-height: 280px;
    padding: 2rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    border: 1px solid #eee7d8;
    background: linear-gradient(145deg, #fff 0%, #fdfbf6 100%);
}

.prediction-empty-state__icon,
.prediction-otp-modal__icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(160, 140, 91, 0.12);
    color: var(--brand-gold);
    font-size: 2rem;
}

.prediction-empty-state h3 {
    margin: 0 0 0.6rem;
    color: #292929;
    font-size: 1.15rem;
}

.prediction-empty-state p {
    max-width: 430px;
    margin: 0;
    color: #666;
    line-height: 1.9;
}

.prediction-otp-dialog {
    width: min(420px, calc(100% - 2rem));
    max-width: 420px;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    overflow: visible;
}

.prediction-otp-dialog::backdrop {
    background: rgba(34, 34, 34, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

body.prediction-otp-is-active {
    overflow: hidden;
}

.prediction-otp-modal {
    position: relative;
    display: flex;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.16);
    text-align: center;
    opacity: 1;
    transform: none;
}

.prediction-otp-modal__close {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #888;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.prediction-otp-modal__close:hover {
    color: #333;
}

.prediction-otp-modal .modal-body {
    padding-top: 1rem;
}

.prediction-otp-modal__icon {
    width: 58px;
    height: 58px;
    margin-bottom: 0.65rem;
}

.prediction-otp-modal__description {
    margin: 0.75rem 0 1.25rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.9;
}

.prediction-otp-field input {
    direction: ltr;
    text-align: center;
    letter-spacing: 0.45rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.prediction-otp-modal .modal-button {
    width: 100%;
    min-height: 46px;
    margin-top: 0.5rem;
}

.prediction-otp-resend {
    display: flex;
    min-height: 28px;
    margin-top: 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #777;
    font-size: 0.82rem;
}

.prediction-otp-resend button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-gold);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.prediction-otp-resend button:disabled {
    color: #999;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .prediction-form__grid {
        grid-template-columns: 1fr;
    }

    .prediction-field--full {
        grid-column: auto;
    }

    .prediction-form {
        padding: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prediction-form .prediction-field input,
    .prediction-form .prediction-field select,
    .prediction-form .prediction-field textarea,
    .prediction-otp-modal .prediction-field input {
        transition: none;
    }
}
