/* User Menu Dropdown Styles for Main Header */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #374151;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: #f3f4f6;
    color: #356DF1;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: #f8fafc;
    color: #356DF1;
    text-decoration: none;
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #E5E7EB;
}

/* Dropdown toggle functionality */
.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
    pointer-events: none;
}

/* Remove hover effect - only click on arrow works */

.has-dropdown .dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f3f4f6;
}

.has-dropdown .dropdown-menu a:last-child {
    border-bottom: none;
}

.has-dropdown .dropdown-menu a:hover {
    background: #f8fafc;
    color: #356DF1;
    text-decoration: none;
}

/* User menu specific styles */
.user-menu.has-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

/* Agent Registration Popup Styles */
.agent-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.agent-popup {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.agent-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.agent-popup-header h3 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: #F3F4F6;
    color: #374151;
}

.agent-popup-content {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #111827;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #356DF1;
    box-shadow: 0 0 0 3px rgba(53, 109, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6B7280;
    font-family: 'Inter', sans-serif;
}

.info-notice {
    background: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-text strong {
    color: #495057;
    display: block;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.info-text ul {
    margin: 0;
    padding-left: 16px;
    color: #6C757D;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.info-text li {
    margin-bottom: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-cancel,
.btn-submit {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-cancel {
    background: #F3F4F6;
    color: #374151;
}

.btn-cancel:hover {
    background: #E5E7EB;
}

.btn-submit {
    background: #356DF1;
    color: #ffffff;
}

.btn-submit:hover {
    background: #2563EB;
}

.btn-submit:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

/* Agent Message Styles */
.agent-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

.agent-message-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 12px;
}

.agent-message-content span {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.agent-message-content button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.agent-message-success {
    background: #D1FAE5;
    border: 1px solid #A7F3D0;
}

.agent-message-success .agent-message-content span {
    color: #065F46;
}

.agent-message-success .agent-message-content button {
    color: #059669;
}

.agent-message-success .agent-message-content button:hover {
    background: #A7F3D0;
}

.agent-message-error {
    background: #FEE2E2;
    border: 1px solid #FECACA;
}

.agent-message-error .agent-message-content span {
    color: #991B1B;
}

.agent-message-error .agent-message-content button {
    color: #DC2626;
}

.agent-message-error .agent-message-content button:hover {
    background: #FECACA;
}

.agent-message-info {
    background: #DBEAFE;
    border: 1px solid #BFDBFE;
}

.agent-message-info .agent-message-content span {
    color: #1E40AF;
}

.agent-message-info .agent-message-content button {
    color: #2563EB;
}

.agent-message-info .agent-message-content button:hover {
    background: #BFDBFE;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from { 
        opacity: 0;
        transform: translateX(100%);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .user-dropdown {
        min-width: 180px;
        right: -20px;
    }
    
    .user-btn {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .agent-popup {
        width: 95%;
        margin: 20px;
    }
    
    .agent-popup-header,
    .agent-popup-content {
        padding: 16px;
    }
    
    .agent-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}