/* BM Custom Profile Frontend CSS */
.bmcp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bmcp-form {
    margin-bottom: 20px;
}

.bmcp-form-group {
    margin-bottom: 15px;
}

.bmcp-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.bmcp-form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bmcp-form-field {
    margin-bottom: 15px;
}

.bmcp-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.bmcp-form-field input,
.bmcp-form-field textarea,
.bmcp-form-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bmcp-form-field input[type="checkbox"],
.bmcp-form-field input[type="radio"] {
    width: auto;
    margin-right: 5px;
}

.bmcp-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.bmcp-button:hover {
    background-color: #005a87;
}

.bmcp-button-primary {
    background-color: #0073aa;
}

.bmcp-button-secondary {
    background-color: #666;
}

.bmcp-button-secondary:hover {
    background-color: #444;
}

.bmcp-button-danger {
    background-color: #dc3545;
}

.bmcp-button-danger:hover {
    background-color: #c82333;
}

.bmcp-button-small {
    padding: 5px 10px;
    font-size: 14px;
}

.bmcp-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Message Styles */
.bmcp-message {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.bmcp-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bmcp-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bmcp-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.bmcp-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Profile Styles */
.bmcp-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bmcp-profile-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.bmcp-profile-avatar {
    margin-right: 20px;
}

.bmcp-profile-avatar img {
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.bmcp-profile-user-info h2 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 24px;
}

.bmcp-profile-email {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 16px;
}

.bmcp-profile-joined {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.bmcp-profile-body {
    display: flex;
    min-height: 600px;
}

.bmcp-sidebar {
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #eee;
    flex-shrink: 0;
}

.bmcp-sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bmcp-menu-item {
    border-bottom: 1px solid #eee;
}

.bmcp-menu-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.bmcp-menu-icon {
    margin-right: 10px;
    font-size: 18px;
}

.bmcp-menu-text {
    flex: 1;
}

.bmcp-menu-badge {
    background-color: #0073aa;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.bmcp-menu-item:hover .bmcp-menu-link {
    background-color: #e9ecef;
    color: #0073aa;
}

.bmcp-menu-item.active .bmcp-menu-link {
    background-color: #0073aa;
    color: white;
}

.bmcp-menu-item.active .bmcp-menu-badge {
    background-color: white;
    color: #0073aa;
}

.bmcp-content {
    flex: 1;
    padding: 30px;
}

.bmcp-content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.bmcp-content-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 22px;
}

.bmcp-content-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.bmcp-header-actions {
    display: flex;
    gap: 10px;
}

.bmcp-tab-pane {
    display: none;
}

.bmcp-tab-pane.active {
    display: block;
}

.bmcp-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bmcp-card h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.bmcp-profile-overview .bmcp-profile-field {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.bmcp-profile-field:last-child {
    border-bottom: none;
}

.bmcp-profile-field label {
    font-weight: bold;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.bmcp-profile-field span {
    color: #666;
}

.bmcp-user-groups,
.bmcp-pending-invites {
    margin-top: 0;
}

.bmcp-group-item,
.bmcp-invite-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.bmcp-group-item h5,
.bmcp-invite-item h5 {
    margin: 0 0 5px 0;
    color: #333;
}

.bmcp-group-role {
    display: inline-block;
    padding: 3px 8px;
    background-color: #0073aa;
    color: white;
    font-size: 12px;
    border-radius: 3px;
}

.bmcp-invite-actions {
    margin-top: 10px;
}

.bmcp-invite-actions a {
    display: inline-block;
    margin-right: 10px;
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.bmcp-invite-actions a:hover {
    background-color: #005a87;
}

.bmcp-security-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.bmcp-security-section:last-child {
    border-bottom: none;
}

.bmcp-security-section h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.bmcp-group-card,
.bmcp-invite-card {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

.bmcp-group-card h4,
.bmcp-invite-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.bmcp-group-card p,
.bmcp-invite-card p {
    margin: 0 0 15px 0;
    color: #666;
}

.bmcp-current-group-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
}

.bmcp-group-card.is-current-group {
    border: 1px solid #c7ddff;
}

.bmcp-group-actions {
    margin-top: 15px;
}

.bmcp-group-actions a {
    display: inline-block;
    margin-right: 10px;
    padding: 5px 10px;
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
}

.bmcp-group-actions a:hover {
    background-color: #c82333;
}

.bmcp-join-by-code {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.bmcp-join-by-code h4 {
    margin: 0 0 15px 0;
    color: #333;
}

.bmcp-blog-actions {
    margin-bottom: 20px;
}

/* Login Form Styles */
.bmcp-login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bmcp-login-form h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.bmcp-login-form .bmcp-form-field {
    margin-bottom: 15px;
}

.bmcp-login-form .bmcp-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.bmcp-login-form .bmcp-form-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.bmcp-login-form .bmcp-button {
    width: 100%;
    padding: 12px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.bmcp-login-form .bmcp-button:hover {
    background-color: #005a87;
}

.bmcp-login-form .bmcp-form-links {
    text-align: center;
    margin-top: 15px;
}

.bmcp-login-form .bmcp-form-links a {
    color: #0073aa;
    text-decoration: none;
}

.bmcp-login-form .bmcp-form-links a:hover {
    text-decoration: underline;
}

/* Registration Form Styles */
.bmcp-registration-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bmcp-registration-form h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.bmcp-registration-form .bmcp-form-field {
    margin-bottom: 15px;
}

.bmcp-registration-form .bmcp-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.bmcp-registration-form .bmcp-form-field input,
.bmcp-registration-form .bmcp-form-field textarea,
.bmcp-registration-form .bmcp-form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.bmcp-registration-form .bmcp-button {
    width: 100%;
    padding: 12px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.bmcp-registration-form .bmcp-button:hover {
    background-color: #005a87;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .bmcp-profile-body {
        flex-direction: column;
    }
    
    .bmcp-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .bmcp-sidebar-menu ul {
        display: flex;
        overflow-x: auto;
    }
    
    .bmcp-menu-item {
        border-bottom: none;
        border-right: 1px solid #eee;
        white-space: nowrap;
    }
    
    .bmcp-menu-link {
        flex-direction: column;
        padding: 10px;
        text-align: center;
    }
    
    .bmcp-menu-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    .bmcp-profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bmcp-profile-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .bmcp-content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .bmcp-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .bmcp-login-form,
    .bmcp-registration-form {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .bmcp-profile-container {
        margin: 0 10px;
    }
    
    .bmcp-profile-header {
        padding: 20px;
    }
    
    .bmcp-content {
        padding: 20px;
    }
    
    .bmcp-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .bmcp-header-actions .bmcp-button {
        width: 100%;
        text-align: center;
    }
}

/* BMCP protected media deterrents (does not stop screenshots) */
.bmcp-protected-image,
.bmcp-profile-avatar img,
.bmcp-member-avatar img,
.bmcp-family-member-avatar img,
.bmcp-dependent-avatar img,
.bmcp-photos-container img {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.bmcp-protected-media-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
}

.bmcp-protected-media-wrap > img {
    display: block;
    max-width: 100%;
}

.bmcp-protected-media-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: transparent;
}

.bmcp-protected-media-wrap[data-bmcp-watermark]::after {
    content: attr(data-bmcp-watermark);
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 3;
    font-size: 11px;
    line-height: 1.2;
    color: rgba(255,255,255,0.95);
    background: rgba(0,0,0,0.45);
    padding: 4px 6px;
    border-radius: 4px;
    pointer-events: none;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
