/* ═══════════════════════════════════════════
   field Required Error
═══════════════════════════════════════════ */   
   
    /* Search Field Validation */
.field-has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}
.field-error-msg {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #ef4444;
    animation: fadeInDown 0.2s ease;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════
   SELL EQUIPMENT MODAL
═══════════════════════════════════════════ */


.sell-modal .btn-close {
    /* filter: invert(1); */
    opacity: 0.7;
    transition: opacity 0.2s;
    margin: 0 !important;
}

.sell-modal .btn-close:hover {
    opacity: 1;
}



/* ── Image Upload Area ── */
.sell-image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    min-height: 0;
}

.sell-image-preview-item {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f3f4f6;
}

.sell-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sell-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.sell-image-remove:hover {
    background: #ef4444;
}

.sell-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    user-select: none;
}

.sell-upload-btn:hover {
    border-color: var(--color-primary, #c8a96e);
    color: var(--color-primary, #c8a96e);
    background: #fdf8f0;
}

.sell-upload-btn i {
    font-size: 16px;
}

/* ── Submit Button ── */
.sell-modal #sellFormSubmitBtn {
    transition: opacity 0.2s, transform 0.15s;
}

.sell-modal #sellFormSubmitBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ── Success State ── */
.sell-form-success {
    text-align: center;
    padding: 48px 20px;
}

.sell-form-success i {
    font-size: 60px;
    color: #22c55e;
    margin-bottom: 16px;
    display: block;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sell-form-success h4 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.sell-form-success p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── Error State ── */
.sell-form-error {
    text-align: center;
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sell-form-error i {
    font-size: 28px;
    color: #ef4444;
    margin-bottom: 8px;
    display: block;
}

.sell-form-error p {
    font-size: 13px;
    color: #b91c1c;
    margin: 0;
}

/* ── RTL tweaks ── */
.rtl .sell-modal .btn-close {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.rtl .sell-image-remove {
    right: auto;
    left: 4px;
}


/* ── Request form button loading state ────────────────────────── */
.sell-modal .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sell-modal .btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sellModalSpin 0.6s linear infinite;
}

@keyframes sellModalSpin {
    to { transform: rotate(360deg); }
}

.sell-modal .btn.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
}

/* ── Success / error message transitions ──────────────────────── */
.sell-modal #requestFormSuccess,
.sell-modal #requestFormError {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.sell-modal #requestFormSuccess.is-visible,
.sell-modal #requestFormError.is-visible {
    opacity: 1;
    transform: translateY(0);
}
