/* --- OVERLAY AND POPUP (Shared Styles) --- */

/* Full-screen overlay */
#cufp-popup-overlay, #cufp-activators-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999; /* On top of everything */
    overflow-y: auto;
}

/* Form Container for Profile Form */
#cufp-popup-content {
    background: #fff;
    width: 80%;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Form Container for Activators Form */
#cufp-activators-content {
    background: #fff;
    width: 80%;
    max-width: 800px; /* Wider for more content */
    margin: 50px auto;
    padding: 30px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Close buttons */
#cufp-close-btn, #cufp-activators-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

/* --- FORM FIELDS (Shared Styles) --- */
#cufp-profile-form input[type="text"],
#cufp-profile-form input[type="tel"],
#cufp-activators-form input[type="text"],
#cufp-activators-form textarea {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#cufp-profile-form label,
#cufp-activators-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#cufp-profile-form button[type="submit"],
#cufp-activators-form button[type="submit"] {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

/* --- ACTIVATORS SPECIFIC STYLES --- */
.activator-fieldset {
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
.activator-fieldset legend {
    font-size: 1.1em;
    font-weight: bold;
    padding: 0 10px;
}
#cufp-activators-form textarea {
    min-height: 100px;
    margin-bottom: 10px;
}

.custom-logout-button {
    border-radius: 50%;
    background-color: #3dafe1;
    color: #fff;
    padding: 17px 5px;
    border: white 2px solid;
    text-transform:  uppercase;
}

/* Mega Menu Styling - Matching User Management Design */
#mega-menu-wrap-primary {
    background-color: transparent !important;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
    padding: 0.625rem 1.25rem !important;
    margin: 3px;
    border: 2px solid transparent !important;
    background: #1b7f96 !important;
    color: #FFFFFF !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover {
    background: #15616d !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media only screen and (max-width: 768px) {
    #mega-menu-wrap-primary .mega-menu-toggle + #mega-menu-primary {
        flex-direction: row !important;
    }
}
.activator-download-box span{
    display: inline-block;
}
.activator-download-box {
    text-align: right;
}
.activator-download-box span a{
    display: inline-block;
    width: auto;
}

/* ============================================
   AI Processing Loader - Enhanced
   ============================================ */
   
/* Loader container - centered on screen */
#analyzingStatus,
.analyzingStatus,
[id^="analyzingStatus"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 60px 20px !important;
    margin: 40px auto !important;
    min-height: 300px !important;
    text-align: center !important;
    position: relative !important;
}

/* Animated spinner */
.loader {
    border: 5px solid rgba(52, 152, 219, 0.1);
    border-top: 5px solid #3498db;
    border-right: 5px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 20px;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
    display: block !important;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

/* AI Processing message styling */
#analyzingStatus > div:last-child,
.analyzingStatus > div:last-child,
[id^="analyzingStatus"] > div:last-child {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
    margin-top: 15px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}
