/* ======================================
   WRAPPER & CENTERING
====================================== */
.cma-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* centers children horizontally */
    text-align: center;
    gap: 15px; /* space between avatar and button */
}

/* ======================================
   AVATAR CONTAINER
====================================== */
.cma-avatar-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* ======================================
   AVATAR IMAGE
====================================== */
.cma-avatar-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50px !important;
    display: block;
    transition: transform 0.3s ease;
}

/* ======================================
   HOVER OVERLAY ICON
====================================== */
.cma-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50px;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.cma-avatar-overlay i {
    color: #fff;
    font-size: 24px;
    pointer-events: none;
}

.cma-avatar-container:hover .cma-avatar-overlay {
    opacity: 1;
    transform: scale(1); /* animate from center */
}

/* ======================================
   POPUP OVERLAY
====================================== */
.cma-popup {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.6) !important;
    z-index: 999999 !important;
    justify-content: center;
    align-items: center;
}

.cma-popup.active {
    display: flex !important;
}

/* ======================================
   POPUP CONTENT
====================================== */
.cma-popup-content {
    background: #fff;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    position: relative;
    text-align: center;
}

/* Close button */
.cma-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

/* Errors & success */
.cma-error {
    color: red;
    margin-top: 10px;
    font-size: 14px;
}

.cma-success {
    color: green;
    margin-top: 10px;
    font-size: 14px;
}

/* Styled file input button look */
#cma-file {
    display: block;
    margin: 15px auto;
    padding: 10px;
    border: 2px dashed #ccc;
    width: 100%;
    cursor: pointer;
}

#cma-file:hover {
    border-color: #084AF3;
}

#cma-file:focus {
    outline: none;
    border-color: #084AF3;
}

/* ======================================
   BUTTON
====================================== */
.cma-open-popup {
    border-radius: 6px;
    cursor: pointer;
    padding: 10px 18px;
}

/* ======================================
   DYNAMIC BUTTON COLORS (set via PHP)
====================================== */
/* These will be applied via wp_add_inline_style in your PHP */