/**
 * Role Manager Styles
 *
 * @package DCM_Profile_Membership_Pro
 * @since 1.0.0
 */

/* Role Editor Container */
.dcm-pmp-role-editor-container {
    margin-top: 20px;
}

.dcm-pmp-role-editor-tabs {
    margin-bottom: 20px;
}

.dcm-pmp-role-editor-content {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
}

/* Role Cards */
.dcm-pmp-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dcm-pmp-role-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.dcm-pmp-role-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dcm-pmp-role-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.dcm-pmp-role-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.dcm-pmp-role-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dcm-pmp-role-type.custom {
    background: #e3f2fd;
    color: #1976d2;
}

.dcm-pmp-role-type.default {
    background: #f3e5f5;
    color: #7b1fa2;
}

.dcm-pmp-role-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.dcm-pmp-role-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dcm-pmp-role-stat-number {
    font-weight: 600;
    color: #333;
}

.dcm-pmp-role-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dcm-pmp-role-actions .button {
    font-size: 12px;
    padding: 5px 10px;
    height: auto;
}

/* Capabilities Grid */
.dcm-pmp-capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.dcm-pmp-capability-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    transition: border-color 0.3s ease;
}

.dcm-pmp-capability-card:hover {
    border-color: #007cba;
}

.dcm-pmp-capability-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dcm-pmp-capability-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.dcm-pmp-capability-category {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: #f0f0f0;
    color: #666;
}

.dcm-pmp-capability-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.dcm-pmp-capability-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.dcm-pmp-role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    background: #e8f5e8;
    color: #2e7d32;
}

.dcm-pmp-role-badge.has-capability {
    background: #e8f5e8;
    color: #2e7d32;
}

.dcm-pmp-role-badge.no-capability {
    background: #ffebee;
    color: #c62828;
}

/* Statistics */
.dcm-pmp-statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dcm-pmp-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dcm-pmp-stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #007cba;
    margin-bottom: 5px;
}

.dcm-pmp-stat-label {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dcm-pmp-stat-description {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Import/Export */
.dcm-pmp-import-export-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dcm-pmp-import-section,
.dcm-pmp-export-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.dcm-pmp-section-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.dcm-pmp-section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.dcm-pmp-import-form {
    margin-bottom: 20px;
}

.dcm-pmp-import-form input[type="file"] {
    margin-bottom: 15px;
}

.dcm-pmp-export-options {
    margin-bottom: 20px;
}

.dcm-pmp-export-option {
    margin-bottom: 10px;
}

.dcm-pmp-export-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
}

/* Role Management Forms */
.dcm-pmp-create-role-form {
    max-width: 500px;
}

.dcm-pmp-form-row {
    margin-bottom: 15px;
}

.dcm-pmp-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dcm-pmp-form-row input[type="text"],
.dcm-pmp-form-row textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.dcm-pmp-form-row textarea {
    height: 100px;
    resize: vertical;
}

.dcm-pmp-capabilities-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
}

.dcm-pmp-capability-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 4px;
    background: #fff;
}

.dcm-pmp-capability-item:last-child {
    margin-bottom: 0;
}

.dcm-pmp-capability-item input[type="checkbox"] {
    margin: 0;
}

.dcm-pmp-capability-item label {
    margin: 0;
    font-weight: normal;
    font-size: 14px;
    color: #333;
}

/* Role Badges */
.dcm-pmp-role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dcm-pmp-role-badge.administrator {
    background: #ffebee;
    color: #c62828;
}

.dcm-pmp-role-badge.manager {
    background: #e8f5e8;
    color: #2e7d32;
}

.dcm-pmp-role-badge.employer {
    background: #e3f2fd;
    color: #1976d2;
}

.dcm-pmp-role-badge.member {
    background: #fff3e0;
    color: #ef6c00;
}

.dcm-pmp-role-badge.editor {
    background: #f3e5f5;
    color: #7b1fa2;
}

.dcm-pmp-role-badge.author {
    background: #e0f2f1;
    color: #00695c;
}

.dcm-pmp-role-badge.contributor {
    background: #fce4ec;
    color: #c2185b;
}

.dcm-pmp-role-badge.subscriber {
    background: #f1f8e9;
    color: #558b2f;
}

/* Modal Styles */
.dcm-pmp-modal {
    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: 9999;
}

.dcm-pmp-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dcm-pmp-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dcm-pmp-modal-header h3 {
    margin: 0;
    color: #333;
}

.dcm-pmp-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dcm-pmp-modal-close:hover {
    color: #333;
}

.dcm-pmp-modal-body {
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dcm-pmp-roles-grid {
        grid-template-columns: 1fr;
    }
    
    .dcm-pmp-capabilities-grid {
        grid-template-columns: 1fr;
    }
    
    .dcm-pmp-statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dcm-pmp-import-export-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dcm-pmp-role-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .dcm-pmp-role-actions {
        justify-content: flex-start;
    }
    
    .dcm-pmp-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .dcm-pmp-statistics-grid {
        grid-template-columns: 1fr;
    }
    
    .dcm-pmp-role-editor-content {
        padding: 15px;
    }
    
    .dcm-pmp-role-card {
        padding: 15px;
    }
    
    .dcm-pmp-capability-card {
        padding: 12px;
    }
}

/* Loading States */
.dcm-pmp-loading {
    opacity: 0.6;
    pointer-events: none;
}

.dcm-pmp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: dcm-pmp-spin 1s linear infinite;
}

@keyframes dcm-pmp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.dcm-pmp-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.dcm-pmp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dcm-pmp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Help Tooltips */
.dcm-pmp-help-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.dcm-pmp-help-tooltip::after {
    content: '?';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #007cba;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 5px;
}

.dcm-pmp-help-tooltip:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.dcm-pmp-help-tooltip:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #333;
    margin-bottom: -4px;
} 