/* --- 1. Global Buttons --- 
.ua-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-decoration: none;
    position: relative;
}

.ua-btn.is-primary {
    background: #0f0f0f;
    color: #f5f5f5;
    border: 1px solid #0f0f0f;
}
*/
.ua-btn.is-secondary {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
}

/* --- 2. Loader Animation --- */
.ua-profile-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: uaProfileSpin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    display: none;
}

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

.ua-btn.is-loading {
    color: transparent !important;
    pointer-events: none;
    opacity: 0.8;
}

.ua-btn.is-loading .ua-profile-spinner {
    display: block;
}

/* --- 3. Modal Structure --- */

#cp-profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}
/*
.cp-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.cp-modal-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.cp-modal-content {    
    background: #fff;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
*/

/* Header */
.cp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid #eee;
}

.cp-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #111;
    letter-spacing: -0.02em;
}

.cp-close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Body */
.cp-modal-body {
    overflow-y: auto;
    padding: 0;
    flex: 1;
}



/* Images */
.ua-img-section {
    position: relative;
    margin-bottom: 24px;
}

.ua-cover-area {
    height: 150px;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
}

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

.ua-edit-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: 0.2s;
}

.ua-cover-area:hover .ua-edit-overlay {
    opacity: 1;
}

.ua-mini-btn {
    font-size: 13px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(4px);
}

.ua-mini-btn.remove {
    background: #ef4444;
    padding: 0;
    width: 28px;
    height: 28px;
    justify-content: center;
}

.ua-avatar-area {
    position: absolute;
    bottom: -35px;
    left: 25px;
}

.avatar-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 4px solid #fff;
    position: relative;
    overflow: hidden;
    background: #fff;
}

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

.ua-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    opacity: 0;
    cursor: pointer;
    transition: 0.2s;
}

.avatar-circle:hover .ua-avatar-overlay {
    opacity: 1;
}

.ua-remove-avatar {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    border: 2px solid #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Fields */
.ua-fields-wrapper {
    padding: 24px;
}

.ua-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ua-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ua-field.half {
    width: calc(50% - 6px);
    box-sizing: border-box;
}

.ua-field.full {
    width: 100%;
    box-sizing: border-box;
}

.ua-field label {
    font-size: 13px;
}

.ua-field input,
.ua-field select,
.ua-field textarea {
    outline: none;
    appearance: none;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-counter {
    font-size: 11px;
    color: #999;
}

.char-counter.limit-reached {
    color: red;
}

/* Footer */
.ua-popup-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    /* margin-top: auto; */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    /* background: #fff; */
    /* border-radius: 0 0 16px 16px; */
}

.ua-status-msg {
    font-size: 13px;
    text-align: right;
}

.ua-error-msg {
    display: none;
    color: #ef4444;
    font-weight: 500;
}

/* Success */
.ua-success-view {
    padding: 60px 20px;
    text-align: center;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background: #ecfdf5;
    color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 15px;
}

.ua-actions-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .cp-modal-wrapper {
        align-items: flex-end;
        padding: 0;
        margin-top: auto;
        border-radius: 16px 16px 0 0;
    }
}