/* assets/css/profile.css */

:root {
    --primary: #3396D3;
    --primary-hover: #2a73a8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e1e1e;
    --gray: #6b7280;
    --light: #f9fafb;
    --border: #e5e7eb;
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--light);
    min-height: 100vh;
    font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Profile Container */
.profile-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

/* Avatar */
.avatar-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    background: var(--light);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.avatar-container:hover {
    transform: scale(1.05);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--gray);
    background: #f0f0f0;
}

#avatarIcon {
    transition: color 0.3s;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-container:hover .avatar-edit-overlay {
    opacity: 1;
}

/* Gender Modal */
.gender-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.gender-modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 300px;
    width: 90%;
    text-align: center;
}

.gender-modal-content h4 {
    margin-bottom: 20px;
    color: var(--dark);
}

.gender-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.gender-option {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gender-option i {
    font-size: 2rem;
}

.gender-option[data-gender="male"] i {
    color: var(--primary);
}

.gender-option[data-gender="female"] i {
    color: #ff69b4;
}

.gender-option:hover {
    border-color: var(--primary);
    background: var(--light);
}

.gender-option.selected {
    border-color: var(--primary);
    background: rgba(51, 150, 211, 0.1);
}

.close-gender-modal {
    background: var(--light);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-gender-modal:hover {
    background: var(--border);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 10px 0;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Role Badge (Admin) */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 15px;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px 0;
}

/* Phone Number */
.phone-number {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    direction: ltr;
    margin-bottom: 5px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    background: var(--light);
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.info-label {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.info-value {
    color: var(--dark);
    font-size: 1rem;
    font-weight: 600;
    word-break: break-word;
}

.info-value.null-value {
    color: var(--gray);
    font-style: italic;
}

/* Edit Button (common) */
.edit-btn {
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
}

.edit-btn:hover {
    background: rgba(51, 150, 211, 0.1);
    text-decoration: none;
}

/* ========== Shaba Edit Form ========== */
.shaba-edit-form {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
    width: 100%;
}

.shaba-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    direction: ltr;
    text-align: left;
    font-family: monospace;
    transition: border 0.2s, box-shadow 0.2s;
}

.shaba-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(51, 150, 211, 0.1);
}

.shaba-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.btn-save-shaba, .btn-cancel-shaba {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-save-shaba {
    background: var(--primary);
    color: white;
}

.btn-save-shaba:hover {
    background: var(--primary-hover);
}

.btn-cancel-shaba {
    background: #f0f0f0;
    color: #333;
    border: 1px solid var(--border);
}

.btn-cancel-shaba:hover {
    background: #e0e0e0;
}

/* Bio Edit Form */
.bio-edit-form {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 2px solid var(--primary);
    margin-top: 10px;
}

.bio-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 15px;
}

.bio-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(51, 150, 211, 0.1);
}

.bio-actions {
    display: flex;
    gap: 10px;
}

.btn-save-bio {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-save-bio:hover {
    background: var(--primary-hover);
}

.btn-cancel-bio {
    background: var(--light);
    color: var(--gray);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-cancel-bio:hover {
    background: var(--border);
}

/* Addresses Section */
.addresses-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.addresses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.addresses-header h3 {
    font-size: 1.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-address-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.add-address-btn:hover {
    background: var(--primary-hover);
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.address-card {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transition: all 0.2s;
}

.address-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(51, 150, 211, 0.1);
}

.address-card.selected {
    border: 2px solid var(--primary);
    background: #f0f9ff;
}

.address-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.address-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.address-actions button {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: all 0.2s;
}

.address-actions button:hover {
    color: var(--primary);
}

.address-actions button.delete-address:hover {
    color: var(--danger);
}

/* Verification Messages */
.verification-section {
    margin: 20px 0;
}

.verification-message {
    background: #e7f3ff;
    color: var(--primary);
    padding: 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #b8daff;
    margin-top: 10px;
}

.rejected-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #f5c6cb;
}

.rejected-message a {
    color: #721c24;
    font-weight: 600;
    text-decoration: underline;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.spinner {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Box */
.error-box {
    background: #fee2e2;
    color: var(--danger);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    margin-top: 20px;
    text-align: center;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .profile-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .profile-card {
        padding: 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
    }

    .addresses-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-address-btn {
        width: 100%;
        justify-content: center;
    }

    .gender-options {
        flex-direction: column;
        gap: 10px;
    }

 

    .shaba-actions {
        flex-wrap: wrap;
    }

    .btn-save-shaba, .btn-cancel-shaba {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 15px;
    }

    .avatar-container {
        width: 100px;
        height: 100px;
    }

    .avatar-placeholder {
        font-size: 4rem;
    }

    .profile-header h1 {
        font-size: 1.5rem;
    }

    .phone-number {
        font-size: 1rem;
    }

    .info-item {
        padding: 12px;
    }
}
/* دکمه احراز هویت مجدد (برای کاربران رد شده) */
.btn-re-verify {
    background: var(--danger);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-re-verify:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-re-verify:active {
    transform: translateY(0);
}