/*
 * Profile display and edit form.
 */

/* Main wrapper */

.mls-profile-wrapper {
    max-width: 960px;
    margin: 40px auto;
    padding: 28px;
    border: 1px solid var(--mls-border);
    border-radius: var(--mls-radius-lg);
    background: var(--mls-bg);
    box-shadow: var(--mls-shadow);
}

/* Hero */

.mls-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--mls-border);
}

.mls-profile-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mls-profile-avatar {
    display: flex;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--mls-primary);
    border-radius: 50%;
    background: #eef4fb;
}

.mls-profile-avatar img,
.mls-profile-wrapper .mls-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mls-profile-avatar span {
    color: var(--mls-primary);
    font-size: 38px;
    font-weight: 800;
}

.mls-profile-hero-info h2 {
    margin: 0 0 6px;
    color: var(--mls-text);
    font-size: 28px;
    line-height: 1.2;
}

.mls-profile-email {
    margin: 0 0 12px;
    color: var(--mls-muted);
    overflow-wrap: anywhere;
}

.mls-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mls-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.mls-badge-blood {
    background: #fee2e2;
    color: #991b1b;
}

.mls-badge-volunteer {
    background: #dcfce7;
    color: #166534;
}

.mls-profile-hero-actions {
    flex-shrink: 0;
}

/* Information cards */

.mls-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.mls-profile-card {
    padding: 20px;
    border: 1px solid var(--mls-border);
    border-radius: 14px;
    background: var(--mls-card-bg);
}

.mls-profile-card-full {
    grid-column: 1 / -1;
}

.mls-profile-card h3 {
    margin: 0 0 14px;
    color: var(--mls-text);
    font-size: 17px;
}

.mls-info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.mls-info-row:last-child {
    border-bottom: 0;
}

.mls-info-label {
    color: var(--mls-muted);
    font-weight: 600;
}

.mls-info-value {
    color: var(--mls-text);
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}

/* Interests */

.mls-interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mls-interest-tag {
    padding: 7px 14px;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--mls-primary);
    font-size: 14px;
    font-weight: 700;
}

.mls-empty-text {
    margin: 0;
    color: var(--mls-muted);
}

.mls-profile-footer {
    margin-top: 24px;
    text-align: right;
}

/* Buttons and links */

.mls-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.mls-button-primary {
    background: var(--mls-primary);
    color: #ffffff;
}

.mls-button-light {
    background: #f1f5f9;
    color: #334155;
}

.mls-logout-link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    background: #475569;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

/* Edit form */

.mls-profile-edit-form {
    margin-top: 20px;
}

.mls-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.mls-edit-header h2 {
    margin: 0;
    color: var(--mls-text);
}

.mls-profile-edit-form label {
    display: block;
    margin: 14px 0 6px;
    color: var(--mls-text);
    font-weight: 600;
}

.mls-profile-edit-form button {
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--mls-primary);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.mls-photo-edit {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mls-profile-avatar-large {
    width: 84px;
    height: 84px;
}

.mls-photo-upload {
    flex: 1;
    min-width: 0;
}

.mls-photo-upload label {
    margin: 0 0 6px;
    font-weight: 700;
}

.mls-edit-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}