/* ============================================================
   💰 Sell Part Page - صفحه درخواست فروش قطعه
   رنگ اصلی: فیروزه‌ای (#14b8a6)
   ============================================================ */

* {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
body {
    background: #f7f7f7;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #1a1a2e;
}

/* ============ HERO ============ */
.page-hero {
    background: linear-gradient(135deg, #0f3a3a 0%, #0d5a55 50%, #14b8a6 100%);
    color: #ffffff;
    padding: 32px 20px 60px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.page-hero-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.page-hero h1 {
    font-family: 'Pinar', 'Vazirmatn', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.page-hero h1 svg { flex-shrink: 0; width: 30px; height: 30px; }
.page-hero p {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.7;
}
.hero-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    margin-bottom: 20px;
}
.hero-back:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

/* ============ BODY ============ */
.page-body {
    max-width: 900px;
    margin: -30px auto 0;
    padding: 0 20px 60px;
    position: relative;
    z-index: 3;
}

/* ============ FORM SECTION ============ */
.form-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px 26px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
}
.form-section:first-child { margin-top: 30px; }
.form-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}
.form-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #14b8a6, #0d9488);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.4);
    flex-shrink: 0;
}
.form-section-title span {
    color: #14b8a6;
    font-weight: 400;
    font-size: 12px;
    margin-right: auto;
}

/* ============ INPUTS ============ */
.pr-input,
.pr-textarea {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f9fafb;
    direction: rtl;
    box-sizing: border-box;
}
.pr-input:focus,
.pr-textarea:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
    background: #ffffff;
}
.pr-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 480px) { .pr-input-row { grid-template-columns: 1fr; } }
.pr-input[dir="ltr"] { direction: ltr; text-align: left; }
.pr-textarea { min-height: 100px; resize: vertical; }

/* ============ UPLOAD ZONE ============ */
.pr-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}
.pr-upload-zone:hover,
.pr-upload-zone.dragover {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, 0.03);
}
.pr-upload-zone svg {
    width: 40px;
    height: 40px;
    color: #14b8a6;
    margin: 0 auto 8px;
}
.pr-upload-zone p { font-size: 14px; color: #6b7280; margin: 0; }
.pr-upload-zone small { display: block; font-size: 12px; color: #9ca3af; margin-top: 4px; }

.pr-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}
.pr-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #f3f4f6;
}
.pr-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.pr-preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    background: rgba(20, 184, 166, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: transform 0.2s;
}
.pr-preview-remove:hover { transform: scale(1.15); }

/* ============ PHONE + OTP ============ */
.pr-phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.pr-phone-row .pr-input { flex: 1; }
.pr-btn-send-otp {
    background: #14b8a6;
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    font-family: inherit;
}
.pr-btn-send-otp:hover:not(:disabled) { background: #0d9488; }
.pr-btn-send-otp:disabled { background: #d1d5db; cursor: not-allowed; }
.pr-btn-send-otp.pr-btn-resend-link {
    background: transparent !important;
    color: #14b8a6 !important;
    text-decoration: underline;
    padding: 0 4px !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0 !important;
    white-space: nowrap;
}
.pr-btn-send-otp.pr-btn-resend-link:hover {
    color: #0d9488 !important;
    background: transparent !important;
}

.pr-otp-row { margin-top: 10px; display: none; }
.pr-otp-row.active { display: block; }
.pr-verified-badge {
    display: none;
    align-items: center;
    gap: 6px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}
.pr-verified-badge.active { display: flex; }

/* ============ ACTIONS ============ */
.pr-actions-row {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    align-items: stretch;
    margin-top: 12px;
    width: 100%;
}
.pr-actions-row .pr-submit-btn { flex: 1; margin-top: 0; }

.pr-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pr-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(20, 184, 166, 0.35);
}
.pr-submit-btn:disabled {
    background: #e5e7eb !important;
    background-image: none !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pr-cancel-btn {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 100px;
    text-decoration: none;
}
.pr-cancel-btn:hover {
    background: #ccfbf1;
    color: #14b8a6;
    border-color: #14b8a6;
    transform: translateY(-1px);
}

/* ============ LOADING SPINNER ============ */
.pr-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: pr-spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes pr-spin { to { transform: rotate(360deg); } }

/* ============ TOAST ============ */
.pr-toast-wrap {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    pointer-events: none;
    padding: 0 16px;
    direction: rtl;
}
.pr-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: #1a1a2e;
    max-width: 100%;
    width: 100%;
    transform: translateY(-30px) scale(0.92);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    position: relative;
    overflow: hidden;
}
.pr-toast.show { transform: translateY(0) scale(1); opacity: 1; }
.pr-toast.hide { transform: translateY(-30px) scale(0.92); opacity: 0; }
.pr-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: #ffffff;
}
.pr-toast-text { flex: 1; line-height: 1.5; text-align: right; min-width: 0; }
.pr-toast-close {
    background: transparent;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 16px;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.pr-toast-close:hover { background: rgba(0, 0, 0, 0.05); color: #1a1a2e; }
.pr-toast-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.pr-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: right center;
    animation: prToastProgress 5s linear forwards;
}
@keyframes prToastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}
.pr-toast.error .pr-toast-icon { background: linear-gradient(135deg, #EF4444, #DC2626); }
.pr-toast.error .pr-toast-progress-bar { background: linear-gradient(90deg, #EF4444, #DC2626); }
.pr-toast.success .pr-toast-icon { background: linear-gradient(135deg, #10B981, #059669); }
.pr-toast.success .pr-toast-progress-bar { background: linear-gradient(90deg, #10B981, #059669); }
.pr-toast.warning .pr-toast-icon { background: linear-gradient(135deg, #F59E0B, #D97706); }
.pr-toast.warning .pr-toast-progress-bar { background: linear-gradient(90deg, #F59E0B, #D97706); }
.pr-toast.info .pr-toast-icon { background: linear-gradient(135deg, #3B82F6, #2563EB); }
.pr-toast.info .pr-toast-progress-bar { background: linear-gradient(90deg, #3B82F6, #2563EB); }

/* ============ SUCCESS SCREEN ============ */
.pr-success-screen {
    display: none;
    text-align: center;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: 30px;
}
.pr-success-screen.active { display: block; }
.pr-success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #16a34a;
    font-size: 40px;
}
.pr-success-screen h3 {
    font-size: 22px;
    color: #1a1a2e;
    margin: 0 0 8px;
    font-weight: 800;
}
.pr-success-screen p {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 20px;
}
.pr-tracking-box {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    border: 2px dashed #14b8a6;
    border-radius: 14px;
    padding: 20px;
    margin: 16px 0;
    text-align: center;
}
.pr-tracking-label {
    font-size: 12px;
    color: #115e59;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.pr-tracking-code {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 6px;
    color: #0f766e;
    direction: ltr;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.pr-tracking-hint {
    font-size: 11px;
    color: #0d9488;
    margin-top: 6px;
}
.pr-success-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.pr-success-actions .pr-submit-btn {
    flex: 1;
    text-decoration: none;
    margin-top: 0;
}

/* ============ INFO NOTE ============ */
.pr-info-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #ccfbf1;
    border: 1px solid #5eead4;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #115e59;
    line-height: 1.7;
}
.pr-info-note svg {
    flex-shrink: 0;
    color: #14b8a6;
    margin-top: 2px;
}

/* ============ MOBILE ============ */
@media (max-width: 640px) {
    .page-hero { padding: 24px 16px 50px; }
    .page-hero h1 { font-size: 22px; }
    .page-body { padding: 0 16px 40px; }
    .form-section { padding: 20px 18px; }
    .pr-tracking-code { font-size: 22px; letter-spacing: 4px; }
    .pr-cancel-btn { padding: 12px 14px; font-size: 14px; min-width: 80px; }
    .pr-actions-row .pr-submit-btn { padding: 12px; font-size: 14px; }
}
