﻿@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

.profile-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    border: 0.5px solid #e5e5e5;
    font-family: 'DM Sans', sans-serif;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 0.5px solid #eee;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    font-family: 'Cormorant Garamond', serif;
    flex-shrink: 0;
}

.profile-info h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.profile-info p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #aaa;
    letter-spacing: 0.02em;
}

.edit-btn {
    margin-left: auto;
    background: transparent;
    border: 0.5px solid #ccc;
    padding: 8px 18px;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    transition: border-color 0.15s, color 0.15s;
}

    .edit-btn:hover {
        border-color: #1a1a1a;
        color: #1a1a1a;
    }

.profile-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
}

    .profile-field label {
        font-size: 12px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #aaa;
        margin-bottom: 6px;
    }

    .profile-field .value {
        font-size: 14px;
        font-weight: 400;
        color: #1a1a1a;
    }

    .profile-field input {
        padding: 11px 14px;
        border-radius: 8px;
        border: 0.5px solid #e5e5e5;
        background: #f9f9f9;
        font-family: 'DM Sans', sans-serif;
        font-size: 13px;
        color: #1a1a1a;
        outline: none;
        transition: border-color 0.15s;
        width: 100%;
        box-sizing: border-box;
    }

        .profile-field input:focus {
            border-color: #999;
            background: #fff;
        }

.profile-actions {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 0.5px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.primary-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.15s;
}

    .primary-btn:hover {
        opacity: 0.75;
    }

.secondary-btn {
    background: transparent;
    border: 0.5px solid #ccc;
    padding: 10px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
    transition: border-color 0.15s, color 0.15s;
}

    .secondary-btn:hover {
        border-color: #999;
        color: #1a1a1a;
    }

@media (max-width: 768px) {
    /* Remove the card shell on mobile — use full-bleed sections */
    .user-card[style*="max-width"] {
        max-width: 100% !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0 !important;
    }

    /* ── AVATAR HERO ── */
    .profile-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 2rem 1.5rem 1.5rem;
        margin-bottom: 0;
        border-bottom: none;
        background: linear-gradient(160deg, #f7f5f2 0%, #fff 60%);
    }

    .avatar {
        width: 76px;
        height: 76px;
        font-size: 28px;
        box-shadow: 0 4px 20px rgba(0,0,0,.12);
    }

    .profile-info {
        flex: none;
    }

    .profile-info h3 {
        font-size: 17px;
        font-weight: 600;
    }

    .profile-info p {
        font-size: 13px;
        margin-top: 4px;
    }

    .edit-btn {
        margin-left: 0;
        padding: 10px 28px;
        font-size: 10px;
    }

    /* ── FIELDS AS LIST ROWS ── */
    .profile-details {
        grid-template-columns: 1fr;
        gap: 0;
        border-top: 0.5px solid #f0f0f0;
        margin-top: 0;
    }

    .profile-field {
        padding: 16px 20px;
        border-bottom: 0.5px solid #f0f0f0;
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .profile-field label {
        font-size: 11px;
        margin-bottom: 0;
        min-width: 72px;
        flex-shrink: 0;
        color: #999;
    }

    .profile-field .value {
        font-size: 14px;
        color: #1a1a1a;
        flex: 1;
        text-align: right;
    }

    .profile-field input {
        flex: 1;
        border: none;
        background: transparent;
        text-align: right;
        padding: 0;
        font-size: 14px;
        border-radius: 0;
    }

    .profile-field input:focus {
        border: none;
        background: transparent;
        box-shadow: none;
        outline: none;
    }

    /* ── STICKY SAVE BUTTON ── */
    .profile-actions {
        margin: 0;
        padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
        border-top: 0.5px solid #f0f0f0;
        justify-content: stretch;
        flex-direction: column;
    }

    .primary-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 12px;
        border-radius: 14px;
    }
}
