/* public_html/css/roles.css */

/* --- Form Styles --- */
.permissions-form {
    border: 1px solid #f0f0f0;
}

.form-label {
    font-weight: 500;
    color: #333;
}

.form-control, .form-select {
    padding: .75rem 1rem;
    border-color: #e0e0e0;
}
.form-control:focus, .form-select:focus {
    border-color: #b7924f;
    box-shadow: 0 0 0 0.25rem rgba(183, 146, 79, 0.25);
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.permission-group .form-check {
    margin-bottom: 1rem;
}

.form-check-label {
    cursor: pointer;
}

.btn-custom {
    background-color: #b7924f;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
}
.btn-custom:hover {
    background-color: #a58347;
    color: white;
}
.btn-outline-secondary {
    border-radius: 50px;
}


/* --- Roles List Styles --- */
.roles-list-container {
    display: grid;
    gap: 1rem;
}

.role-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: all 0.2s ease-in-out;
}

.role-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.role-card .user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 200px; /* To prevent squishing */
}

.role-card .user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.role-card .role-details {
    flex-grow: 1;
    text-align: right;
}

.role-details .role-name {
    font-weight: bold;
    color: #273A41;
}

.role-details .permissions-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit text to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-card .role-actions .btn-link {
    color: #6c757d;
    text-decoration: none;
}
.role-card .role-actions .btn-link:hover {
    color: #343a40;
}

/* For responsive */
@media (max-width: 768px) {
    .role-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .role-card .role-details {
        width: 100%;
    }
    .role-card .role-actions {
        align-self: flex-end;
    }
}